Skip to content
Snippets Groups Projects
Select Git revision
  • cc1021e06f9f40826fc0c66172ec4ba61653ae15
  • master default
2 results

Makefile

Blame
  • Fraknói Tamás's avatar
    ftomi authored
    cc1021e0
    History
    Makefile 573 B
    CC = g++
    
    # -g or nothing
    DEBUG = 
    
    PROJECT = minimatrixrpi
    COMPONENTS = animation mxframe spiframe spisender matrix_server ola_receiver
    COMPONENTS_O = $(addsuffix .o,$(COMPONENTS))
    LIBS = -lwiringPi `pkg-config --cflags --libs libola` -lpthread
    
    all: $(PROJECT)
    
    %.o: %.cpp %.h
    	$(CC) -c $(DEBUG) $<
    
    $(PROJECT).o: $(PROJECT).cpp
    	$(CC) -c $(DEBUG) $<
    
    $(PROJECT): $(PROJECT).o $(COMPONENTS_O)
    	$(CC) $^ $(LIBS) $(DEBUG) -o $@
    	chmod +x $(PROJECT)
    
    clean:
    	rm -f $(PROJECT) *.o
    
    install:
    	sudo cp minimatrixrpi /usr/bin/
    	sudo cp minimatrixrpi.service /etc/systemd/system/