-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmakefile
More file actions
101 lines (77 loc) · 2.58 KB
/
Copy pathmakefile
File metadata and controls
101 lines (77 loc) · 2.58 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
CC = gcc
ifdef DEBUGMODE
CFLAGS = -g -Wall
AL_LIBS = `allegro-config --libs --static`
DEFINES = -DDEBUG
else
ifdef RELEASE
CFLAGS = -Wall -O3 -fexpensive-optimizations -s
AL_LIBS = `allegro-config --libs --static`
else
CFLAGS = -O -Wall
AL_LIBS = `allegro-config --libs --static`
endif
endif
DEFINES += -DTERMIOS -DIGNORE_CLONES
ifdef MINGDIR
ifdef STATICLINK
LIBS = $(AL_LIBS)_s -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lole32 -ldinput -lddraw -ldxguid -lwinmm -ldsound
DEFINES += -DALLEGRO_STATICLINK
else
LIBS = $(AL_LIBS)
endif
WINDRES = windres -I rc -O coff
CFLAGS += -mwindows
OBJ = scantool.res listports.o get_port_names.o
EXT = .exe
else
LIBS = $(AL_LIBS)
EXT = .exe
endif
ifdef DEFINES
CFLAGS += $(DEFINES)
endif
OBJ += main.o main_menu.o serial.o options.o sensors.o trouble_code_reader.o custom_gui.o error_handlers.o about.o reset.o
BIN = scantool
ifdef MINGDIR
endif
$(BIN): $(OBJ)
$(CC) $(CFLAGS) -o $(BIN) $(OBJ) $(LIBS)
ifdef MINGDIR
release:
make RELEASE=1 STATICLINK=1
else
release:
make RELEASE=1
endif
all: $(BIN)
clean:
rm -f $(OBJ)
veryclean: clean
rm -f $(BIN)
scantool.res: scantool.rc scantool.ico
windres -O coff -o scantool.res -i scantool.rc
main.o: main.c globals.h main_menu.h error_handlers.h options.h serial.h version.h
$(CC) $(CFLAGS) -c main.c
main_menu.o: main_menu.c globals.h about.h trouble_code_reader.h sensors.h options.h serial.h custom_gui.h main_menu.h
$(CC) $(CFLAGS) -c main_menu.c
serial.o: serial.c globals.h serial.h
$(CC) $(CFLAGS) -c serial.c
options.o: options.c globals.h custom_gui.h serial.h options.h
$(CC) $(CFLAGS) -c options.c
sensors.o: sensors.c globals.h serial.h options.h error_handlers.h sensors.h custom_gui.h
$(CC) $(CFLAGS) -c sensors.c
trouble_code_reader.o: trouble_code_reader.c globals.h serial.h options.h custom_gui.h error_handlers.h trouble_code_reader.h
$(CC) $(CFLAGS) -c trouble_code_reader.c
custom_gui.o: custom_gui.c globals.h custom_gui.h
$(CC) $(CFLAGS) -c custom_gui.c
error_handlers.o: error_handlers.c globals.h error_handlers.h
$(CC) $(CFLAGS) -c error_handlers.c
about.o: about.c globals.h custom_gui.h serial.h sensors.h options.h version.h about.h
$(CC) $(CFLAGS) -c about.c
reset.o: reset.c globals.h custom_gui.h main_menu.h serial.h reset.h
$(CC) $(CFLAGS) -c reset.c
listports.o: listports.c listports.h
$(CC) $(CFLAGS) -c listports.c
get_port_names.o: get_port_names.c listports.h get_port_names.h
$(CC) $(CFLAGS) -c get_port_names.c