build.mk 5.36 KB
Newer Older
Jeroen Vreeken's avatar
Jeroen Vreeken committed
1
2

LIBDIR:=$(DIR)/lib
3
CLEAN += $(DIR)/lib/.libs
Jeroen Vreeken's avatar
Jeroen Vreeken committed
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

$(eval $(call SUBDIR,aalib))
$(eval $(call SUBDIR,predictlib))
$(eval $(call SUBDIR,mod_websocket_dt))

CONSOLE_TARGETS := 
CONSOLE_TARGETS += $(DIR)/console_joystick
CONSOLE_TARGETS += $(DIR)/command_shell
CONSOLE_TARGETS += $(DIR)/console_moontracker
CONSOLE_TARGETS += $(DIR)/trace_proxy
CONSOLE_TARGETS += $(DIR)/trace_log
CONSOLE_TARGETS += $(DIR)/console_j2000tracker
CONSOLE_TARGETS += $(DIR)/console_j2000tracer
CONSOLE_TARGETS += $(DIR)/console_j2000_indi
CONSOLE_TARGETS += $(DIR)/log_proxy
CONSOLE_TARGETS += $(DIR)/spg_auth
CONSOLE_TARGETS += $(DIR)/console_idle
CONSOLE_TARGETS += $(DIR)/console_suntracker
CONSOLE_TARGETS += $(DIR)/console_azel
CONSOLE_TARGETS += $(DIR)/console_manual
CONSOLE_TARGETS += $(DIR)/console_weather
CONSOLE_TARGETS += $(DIR)/console_dt_model
CONSOLE_TARGETS += $(DIR)/await_controller
CONSOLE_TARGETS += $(DIR)/console_sattracker
Jeroen Vreeken's avatar
Jeroen Vreeken committed
28
29
CONSOLE_TARGETS += $(DIR)/console_httpd

Jeroen Vreeken's avatar
Jeroen Vreeken committed
30
31
32
33
34

#mod_websocket_dt/mod_websocket_dt.so

CONSOLE_SRCS :=

35
36
$(DIR)/await_controller.o: CFLAGS += -Wall -O3
$(DIR)/await_controller_LDFLAGS += -lutils
Jeroen Vreeken's avatar
Jeroen Vreeken committed
37
38
39
40
$(DIR)/await_controller: libutils.la
$(DIR)/await_controller: $(DIR)/await_controller.o
CONSOLE_SRCS += $(DIR)/await_controller.c

41
42
$(DIR)/console_joystick.o: CFLAGS += -Wall -O3
$(DIR)/console_joystick_LDFLAGS += -lcommand
Jeroen Vreeken's avatar
Jeroen Vreeken committed
43
44
45
46
$(DIR)/console_joystick: libcommand.la
$(DIR)/console_joystick: $(DIR)/console_joystick.o
CONSOLE_SRCS += $(DIR)/console_joystick.c

47
48
$(DIR)/command_shell.o: CFLAGS += -Wall -O3
$(DIR)/command_shell_LDFLAGS += -lcommand
Jeroen Vreeken's avatar
Jeroen Vreeken committed
49
50
51
52
$(DIR)/command_shell: libcommand.la
$(DIR)/command_shell: $(DIR)/command_shell.o
CONSOLE_SRCS += $(DIR)/command_shell.c

53
54
$(DIR)/console_moontracker.o: CFLAGS += -Wall -O3
$(DIR)/console_moontracker_LDFLAGS += -lcommand -lm -laa
Jeroen Vreeken's avatar
Jeroen Vreeken committed
55
56
57
58
$(DIR)/console_moontracker: libcommand.la libaa.la
$(DIR)/console_moontracker: $(DIR)/console_moontracker.o
CONSOLE_SRCS += $(DIR)/console_moontracker.c

59
60
$(DIR)/console_j2000tracker.o: CFLAGS += -Wall -O3
$(DIR)/console_j2000tracker_LDFLAGS += -lcommand -lm -lnova -ltrace
Jeroen Vreeken's avatar
Jeroen Vreeken committed
61
62
63
64
$(DIR)/console_j2000tracker: libcommand.la libtrace.la libnova.la
$(DIR)/console_j2000tracker: $(DIR)/console_j2000tracker.o
CONSOLE_SRCS += $(DIR)/console_j2000tracker.c

65
66
$(DIR)/console_j2000tracer.o: CFLAGS += -Wall -O3
$(DIR)/console_j2000tracer_LDFLAGS += -lm -lnova -lutils
Jeroen Vreeken's avatar
Jeroen Vreeken committed
67
68
69
70
$(DIR)/console_j2000tracer: libutils.la libnova.la
$(DIR)/console_j2000tracer: $(DIR)/console_j2000tracer.o
CONSOLE_SRCS += $(DIR)/console_j2000tracer.c

71
72
$(DIR)/console_j2000_indi.o: CFLAGS += -Wall -O3
$(DIR)/console_j2000_indi_LDFLAGS += -lm -lindi -lindidriver -lnova -lutils
Jeroen Vreeken's avatar
Jeroen Vreeken committed
73
74
75
76
$(DIR)/console_j2000_indi: libutils.la libnova.la
$(DIR)/console_j2000_indi: $(DIR)/console_j2000_indi.o
CONSOLE_SRCS += $(DIR)/console_j2000_indi.c

77
78
$(DIR)/console_azel.o: CFLAGS += -Wall -O3
$(DIR)/console_azel_LDFLAGS += -lcommand
Jeroen Vreeken's avatar
Jeroen Vreeken committed
79
80
81
82
$(DIR)/console_azel: libcommand.la
$(DIR)/console_azel: $(DIR)/console_azel.o
CONSOLE_SRCS += $(DIR)/console_azel.c

83
84
$(DIR)/console_manual.o: CFLAGS += -Wall -O3
$(DIR)/console_manual_LDFLAGS += -lcommand
Jeroen Vreeken's avatar
Jeroen Vreeken committed
85
86
87
88
$(DIR)/console_manual: libcommand.la
$(DIR)/console_manual: $(DIR)/console_manual.o
CONSOLE_SRCS += $(DIR)/console_manual.c

89
90
$(DIR)/console_suntracker.o: CFLAGS += -Wall -O3
$(DIR)/console_suntracker_LDFLAGS += -lcommand -lm -laa
Jeroen Vreeken's avatar
Jeroen Vreeken committed
91
92
93
94
$(DIR)/console_suntracker: libcommand.la libaa.la
$(DIR)/console_suntracker: $(DIR)/console_suntracker.o
CONSOLE_SRCS += $(DIR)/console_suntracker.c

95
96
$(DIR)/console_idle.o: CFLAGS += -Wall -O3
$(DIR)/console_idle_LDFLAGS += -lcommand
Jeroen Vreeken's avatar
Jeroen Vreeken committed
97
98
99
100
$(DIR)/console_idle: libcommand.la
$(DIR)/console_idle: $(DIR)/console_idle.o
CONSOLE_SRCS += $(DIR)/console_idle.c

101
102
$(DIR)/console_weather.o: CFLAGS += -Wall -O3
$(DIR)/console_weather_LDFLAGS += -lutils
Jeroen Vreeken's avatar
Jeroen Vreeken committed
103
104
105
106
$(DIR)/console_weather: libutils.la
$(DIR)/console_weather: $(DIR)/console_weather.o
CONSOLE_SRCS += $(DIR)/console_weather.c

107
108
$(DIR)/console_dt_model.o: CFLAGS += -Wall -O3 `pkg-config --cflags glib-2.0`
$(DIR)/console_dt_model_LDFLAGS += `pkg-config --libs glib-2.0` -llog -lutils
Jeroen Vreeken's avatar
Jeroen Vreeken committed
109
110
111
112
$(DIR)/console_dt_model: liblog.la libutils.la
$(DIR)/console_dt_model: $(DIR)/console_dt_model.o
CONSOLE_SRCS += $(DIR)/console_dt_model.c

113
114
$(DIR)/trace_proxy.o: CFLAGS += -Wall -O3
$(DIR)/trace_proxy_LDFLAGS += -ltrace
Jeroen Vreeken's avatar
Jeroen Vreeken committed
115
116
117
118
$(DIR)/trace_proxy: libtrace.la
$(DIR)/trace_proxy: $(DIR)/trace_proxy.o
CONSOLE_SRCS += $(DIR)/trace_proxy.c

119
120
$(DIR)/trace_log.o: CFLAGS += -Wall -O3
$(DIR)/trace_log_LDFLAGS += -lutils
Jeroen Vreeken's avatar
Jeroen Vreeken committed
121
122
123
124
$(DIR)/trace_log: libutils.la
$(DIR)/trace_log: $(DIR)/trace_log.o
CONSOLE_SRCS += $(DIR)/trace_log.c

125
126
$(DIR)/log_proxy.o: CFLAGS += -Wall -O3
$(DIR)/log_proxy_LDFLAGS += -llog
Jeroen Vreeken's avatar
Jeroen Vreeken committed
127
128
129
130
$(DIR)/log_proxy: liblog.la
$(DIR)/log_proxy: $(DIR)/log_proxy.o
CONSOLE_SRCS += $(DIR)/log_proxy.c

131
132
$(DIR)/spg_auth.o: CFLAGS += -Wall -O3
$(DIR)/spg_auth_LDFLAGS += -lcommand
Jeroen Vreeken's avatar
Jeroen Vreeken committed
133
134
135
136
$(DIR)/spg_auth: libcommand.la
$(DIR)/spg_auth: $(DIR)/spg_auth.o
CONSOLE_SRCS += $(DIR)/spg_auth.c

137
138
$(DIR)/console_sattracker.o: CFLAGS += -Wall -O3
$(DIR)/console_sattracker_LDFLAGS += -lcommand -lnova -lpredict
Jeroen Vreeken's avatar
Jeroen Vreeken committed
139
140
141
142
$(DIR)/console_sattracker: libcommand.la libpredict.la libnova.la
$(DIR)/console_sattracker: $(DIR)/console_sattracker.o
CONSOLE_SRCS += $(DIR)/console_sattracker.c

Jeroen Vreeken's avatar
Jeroen Vreeken committed
143
144
145
146
147
148
$(DIR)/console_httpd.o: CFLAGS += -Wall -O0 -g
$(DIR)/console_httpd_LDFLAGS += -llog -ltrace -lcommand -lwebsockets -lmagic
$(DIR)/console_httpd: liblog.la
$(DIR)/console_httpd: $(DIR)/console_httpd.o
CONSOLE_SRCS += $(DIR)/console_httpd.c

Jeroen Vreeken's avatar
Jeroen Vreeken committed
149
150
151
152

SRCS += $(CONSOLE_SRCS)
TARGETS += $(CONSOLE_TARGETS)
CLEAN += $(CONSOLE_TARGETS) $(CONSOLE_SRCS:.c=.o)