forked from shunte88/LMSMonitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_valgrind
45 lines (30 loc) · 1.07 KB
/
make_valgrind
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
# making leaner with overrides - 20200407
TARGET = ./bin/lmsmonitor
# need https support so ssl and crypto added
LIBS = -pthread -lrt -L./lib -li2c -lssl -lcrypto
CC = g++
CFLAGS = -g -Wall -std=c11 -O0 -fPIC -fno-rtti -Wno-unused-variable \
-Wno-unused-parameter -Wstringop-truncation -mfpu=vfp -mfloat-abi=hard \
-fpermissive -Wunused-function -Wstringop-truncation -Wunused-but-set-variable -Wstringop-overflow \
-funsafe-math-optimizations -ffast-math -pipe -I. -I./src
CAPTURE_BMP = -DCAPTURE_BMP -I./src -I./capture
bin:
mkdir bin
.PHONY: default all clean
default: $(TARGET)
all: bin std default
OBJECTS = $(patsubst %.cpp, %.o, $(wildcard ./src/*.cpp)) $(patsubst %.cc, %.o, $(wildcard ./src/*.cc)) $(patsubst %.c, %.o, $(wildcard ./src/*.c))
HEADERS = $(wildcard ./src/*.h) $(wildcard ./font/*.h)
%.o: %cc $(HEADERS)
$(CC) $(CFLAGS) -c $< -o $@
std:
%.o: %.c $(HEADERS)
$(CC) $(CFLAGS) -c $< -o $@
.PRECIOUS: $(TARGET) $(OBJECTS)
$(TARGET): $(OBJECTS)
$(CC) $(OBJECTS) -g -Wall $(LIBS) -o $@
clean:
-rm -f capture/*.o
-rm -f src/*.o
-rm -f *.o
-rm -f $(TARGET)