forked from g4klx/MMDVM-Display
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
69 lines (51 loc) · 2.75 KB
/
Copy pathMakefile
File metadata and controls
69 lines (51 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# This makefile is for all platforms, but doesn't include support for the HD44780, OLED, or PCF8574 displays on the
# Raspberry Pi by default.
CC = cc
CXX = c++
CFLAGS = -g -O3 -Wall -std=c++11 -MMD -MD -pthread -I/usr/local/include
LIBS = -lpthread -lutil -lmosquitto
LDFLAGS = -g -L/usr/local/lib
SRCS = $(wildcard *.cpp)
DEPS = $(SRCS:.cpp=.d)
# This makefile is for use with the Raspberry Pi when using an HD44780 compatible display. The wiringpi library is needed.
# Support for the Adafruit i2c 16 x 2 RGB LCD Pi Plate
#CFLAGS = -g -O3 -Wall -std=c++11 -MMD -MD -pthread -DUSE_HD44780 -DUSE_ADAFRUIT_DISPLAY -I/usr/local/include
#LIBS = -lwiringPi -lwiringPiDev -lpthread -lutil -lmosquitto
# This makefile is for use with the Raspberry Pi when using an HD44780 compatible display. The wiringpi library is needed.
#CFLAGS = -g -O3 -Wall -std=c++11 -MMD -MD -pthread -DUSE_HD44780 -I/usr/local/include
#LIBS = -lwiringPi -lwiringPiDev -lpthread -lutil -lmosquitto
# This makefile is for use with the Raspberry Pi when using an OLED display. The wiringpi library is not needed.
#CFLAGS = -g -O3 -Wall -std=c++11 -MMD -MD -pthread -DUSE_OLED -I/usr/local/include
#LIBS = -lArduiPi_OLED -lpthread -lutil -lmosquitto
# This makefile is for use with the Raspberry Pi when using an HD44780 compatible display. The wiringpi library is needed.
# Support for the HD44780 connected via a PCF8574 8-bit GPIO expander IC
#CFLAGS = -g -O3 -Wall -std=c++11 -MMD -MD -pthread -DUSE_HD44780 -DUSE_PCF8574_DISPLAY -I/usr/local/include
#LIBS = -lwiringPi -lwiringPiDev -lpthread -lutil -lmosquitto
OBJS1 = Conf.o Display.o MMDVM-Display.o Dummy.o HD44780.o LCDproc.o Log.o MQTTConnection.o ModemSerialPort.o Mutex.o \
Nextion.o OLED.o SerialPort.o StopWatch.o TFTSurenoo.o Thread.o Timer.o UARTController.o Utils.o
OBJS2 = Conf.o Log.o MQTTConnection.o ModemSerialPort.o Mutex.o NextionUpdater.o SerialPort.o StopWatch.o Thread.o Timer.o \
UARTController.o Utils.o
all: MMDVM-Display NextionUpdater
MMDVM-Display: $(OBJS1)
$(CXX) $(OBJS1) $(LDFLAGS) $(LIBS) -o MMDVM-Display
NextionUpdater: $(OBJS2)
$(CXX) $(OBJS2) $(LDFLAGS) $(LIBS) -o NextionUpdater
%.o: %.cpp
$(CXX) $(CFLAGS) -c -o $@ $<
-include $(DEPS)
MMDVM-Display.o: GitVersion.h FORCE
NextionUpdater.o: GitVersion.h FORCE
.PHONY: GitVersion.h
FORCE:
install:
install -m 755 MMDVM-Display /usr/local/bin/
install -m 755 NextionUpdater /usr/local/bin/
clean:
$(RM) MMDVM-Display NextionUpdater *.o *.d *.bak *~ GitVersion.h
# Export the current git version if the index file exists, else 000...
GitVersion.h:
ifneq ("$(wildcard .git/index)","")
echo "const char *gitversion = \"$(shell git rev-parse HEAD)\";" > $@
else
echo "const char *gitversion = \"0000000000000000000000000000000000000000\";" > $@
endif