-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
51 lines (44 loc) · 1.28 KB
/
Makefile
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
#OBJS specifies which files to compile as part of the project
# OBJS = exemplo.cpp
OBJ = main
OUT = ctrlcam
EXT = .c
OBJ2 =
#replace
OUT2 =
#replace
EXT2 = .c
DEPS = './deps/flag/flag.c' './deps/b64/encode.c' './deps/jsmn/jsmn.c' -I './deps/jsmn'
DEPS =
# DEPS2 = './deps/str-replace/str-replace.c' './deps/str-replace/occurrences.c' './deps/str-replace/strdup.c'
# './deps/flag/flag.c' './deps/b64/encode.c'
#'./deps/b64/decode.c'
#code.c
#CC specifies which compiler we're using
# CC = g++
CC = clang
CC2 = clang
#COMPILER_FLAGS specifies the additional compilation options we're using
# -w suppresses all warnings
COMPILER_FLAGS = -Wall -g -std=c99
COMPILER_FLAGS2 = -Wall -g -std=c99
#-Wpedantic
#LINKER_FLAGS specifies the libraries we're linking against
LINKER_FLAGS = -lcurl -lm -L './deps/jsmn' -ljsmn
LINKER_FLAGS2 =
# -lglut -lGL -lGLU -lXmu -lXext -lXi -lX11 -lm
# -lcurl
# -lm -lpthread -lSDL2
# -lgmpxx -lgmp
all: objects
# routine to run
objects:
$(CC) $(OBJ)$(EXT) $(DEPS) $(COMPILER_FLAGS) -o $(OUT) $(LINKER_FLAGS)
rm ./cameras/*.cache
# $(CC2) $(OBJ2)$(EXT2) $(DEPS2) $(COMPILER_FLAGS2) $(LINKER_FLAGS2) -o $(OUT2)
debug:
$(CC) $(OBJ)$(EXT) -DDEBUG=1 $(DEPS) $(COMPILER_FLAGS) -o $(OUT) $(LINKER_FLAGS)
# example code to clean stuff
clean:
rm $(OBJ) $(OBJ2)
rm ./cameras/*.cache