build.mk 5.51 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

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

CONSOLE_TARGETS := 
CONSOLE_TARGETS += $(DIR)/command_shell
CONSOLE_TARGETS += $(DIR)/console_moontracker
CONSOLE_TARGETS += $(DIR)/trace_proxy
CONSOLE_TARGETS += $(DIR)/trace_log
14
15

ifdef BUILD_CONSOLE_J2000
Jeroen Vreeken's avatar
Jeroen Vreeken committed
16
17
CONSOLE_TARGETS += $(DIR)/console_j2000tracker
CONSOLE_TARGETS += $(DIR)/console_j2000tracer
18
19
endif

Jeroen Vreeken's avatar
Jeroen Vreeken committed
20
21
22
23
24
25
26
27
28
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
29
30

ifdef BUILD_CONSOLE_SATTRACKER
Jeroen Vreeken's avatar
Jeroen Vreeken committed
31
CONSOLE_TARGETS += $(DIR)/console_sattracker
32
endif
33
34

ifdef BUILD_CONSOLE_HTTPD
Jeroen Vreeken's avatar
Jeroen Vreeken committed
35
CONSOLE_TARGETS += $(DIR)/console_httpd
36
endif
Jeroen Vreeken's avatar
Jeroen Vreeken committed
37

38
39
ifneq ($(OS), FreeBSD)
CONSOLE_TARGETS += $(DIR)/console_joystick
40
41
42
endif

ifdef BUILD_CONSOLE_J2000_INDI
43
44
CONSOLE_TARGETS += $(DIR)/console_j2000_indi
endif
Jeroen Vreeken's avatar
Jeroen Vreeken committed
45
46
47
48
49

#mod_websocket_dt/mod_websocket_dt.so

CONSOLE_SRCS :=

50
51
$(DIR)/await_controller.o: CFLAGS += -Wall -O3
$(DIR)/await_controller_LDFLAGS += -lutils
Jeroen Vreeken's avatar
Jeroen Vreeken committed
52
53
54
55
$(DIR)/await_controller: libutils.la
$(DIR)/await_controller: $(DIR)/await_controller.o
CONSOLE_SRCS += $(DIR)/await_controller.c

56
57
$(DIR)/console_joystick.o: CFLAGS += -Wall -O3
$(DIR)/console_joystick_LDFLAGS += -lcommand
Jeroen Vreeken's avatar
Jeroen Vreeken committed
58
59
60
61
$(DIR)/console_joystick: libcommand.la
$(DIR)/console_joystick: $(DIR)/console_joystick.o
CONSOLE_SRCS += $(DIR)/console_joystick.c

62
63
$(DIR)/command_shell.o: CFLAGS += -Wall -O3
$(DIR)/command_shell_LDFLAGS += -lcommand
Jeroen Vreeken's avatar
Jeroen Vreeken committed
64
65
66
67
$(DIR)/command_shell: libcommand.la
$(DIR)/command_shell: $(DIR)/command_shell.o
CONSOLE_SRCS += $(DIR)/command_shell.c

68
69
$(DIR)/console_moontracker.o: CFLAGS += -Wall -O3
$(DIR)/console_moontracker_LDFLAGS += -lcommand -lm -laa
Jeroen Vreeken's avatar
Jeroen Vreeken committed
70
71
72
73
$(DIR)/console_moontracker: libcommand.la libaa.la
$(DIR)/console_moontracker: $(DIR)/console_moontracker.o
CONSOLE_SRCS += $(DIR)/console_moontracker.c

74
75
$(DIR)/console_j2000tracker.o: CFLAGS += -Wall -O3
$(DIR)/console_j2000tracker_LDFLAGS += -lcommand -lm -lnova -ltrace
76
$(DIR)/console_j2000tracker: libcommand.la libtrace.la
Jeroen Vreeken's avatar
Jeroen Vreeken committed
77
78
79
$(DIR)/console_j2000tracker: $(DIR)/console_j2000tracker.o
CONSOLE_SRCS += $(DIR)/console_j2000tracker.c

80
81
$(DIR)/console_j2000tracer.o: CFLAGS += -Wall -O3
$(DIR)/console_j2000tracer_LDFLAGS += -lm -lnova -lutils
82
$(DIR)/console_j2000tracer: libutils.la
Jeroen Vreeken's avatar
Jeroen Vreeken committed
83
84
85
$(DIR)/console_j2000tracer: $(DIR)/console_j2000tracer.o
CONSOLE_SRCS += $(DIR)/console_j2000tracer.c

86
87
$(DIR)/console_j2000_indi.o: CFLAGS += -Wall -O3
$(DIR)/console_j2000_indi_LDFLAGS += -lm -lindi -lindidriver -lnova -lutils
88
$(DIR)/console_j2000_indi: libutils.la
Jeroen Vreeken's avatar
Jeroen Vreeken committed
89
90
91
$(DIR)/console_j2000_indi: $(DIR)/console_j2000_indi.o
CONSOLE_SRCS += $(DIR)/console_j2000_indi.c

92
93
$(DIR)/console_azel.o: CFLAGS += -Wall -O3
$(DIR)/console_azel_LDFLAGS += -lcommand
Jeroen Vreeken's avatar
Jeroen Vreeken committed
94
95
96
97
$(DIR)/console_azel: libcommand.la
$(DIR)/console_azel: $(DIR)/console_azel.o
CONSOLE_SRCS += $(DIR)/console_azel.c

98
99
$(DIR)/console_manual.o: CFLAGS += -Wall -O3
$(DIR)/console_manual_LDFLAGS += -lcommand
Jeroen Vreeken's avatar
Jeroen Vreeken committed
100
101
102
103
$(DIR)/console_manual: libcommand.la
$(DIR)/console_manual: $(DIR)/console_manual.o
CONSOLE_SRCS += $(DIR)/console_manual.c

104
105
$(DIR)/console_suntracker.o: CFLAGS += -Wall -O3
$(DIR)/console_suntracker_LDFLAGS += -lcommand -lm -laa
Jeroen Vreeken's avatar
Jeroen Vreeken committed
106
107
108
109
$(DIR)/console_suntracker: libcommand.la libaa.la
$(DIR)/console_suntracker: $(DIR)/console_suntracker.o
CONSOLE_SRCS += $(DIR)/console_suntracker.c

110
111
$(DIR)/console_idle.o: CFLAGS += -Wall -O3
$(DIR)/console_idle_LDFLAGS += -lcommand
Jeroen Vreeken's avatar
Jeroen Vreeken committed
112
113
114
115
$(DIR)/console_idle: libcommand.la
$(DIR)/console_idle: $(DIR)/console_idle.o
CONSOLE_SRCS += $(DIR)/console_idle.c

116
117
$(DIR)/console_weather.o: CFLAGS += -Wall -O3
$(DIR)/console_weather_LDFLAGS += -lutils
Jeroen Vreeken's avatar
Jeroen Vreeken committed
118
119
120
121
$(DIR)/console_weather: libutils.la
$(DIR)/console_weather: $(DIR)/console_weather.o
CONSOLE_SRCS += $(DIR)/console_weather.c

122
123
$(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
124
125
126
127
$(DIR)/console_dt_model: liblog.la libutils.la
$(DIR)/console_dt_model: $(DIR)/console_dt_model.o
CONSOLE_SRCS += $(DIR)/console_dt_model.c

128
129
$(DIR)/trace_proxy.o: CFLAGS += -Wall -O3
$(DIR)/trace_proxy_LDFLAGS += -ltrace
Jeroen Vreeken's avatar
Jeroen Vreeken committed
130
131
132
133
$(DIR)/trace_proxy: libtrace.la
$(DIR)/trace_proxy: $(DIR)/trace_proxy.o
CONSOLE_SRCS += $(DIR)/trace_proxy.c

134
135
$(DIR)/trace_log.o: CFLAGS += -Wall -O3
$(DIR)/trace_log_LDFLAGS += -lutils
Jeroen Vreeken's avatar
Jeroen Vreeken committed
136
137
138
139
$(DIR)/trace_log: libutils.la
$(DIR)/trace_log: $(DIR)/trace_log.o
CONSOLE_SRCS += $(DIR)/trace_log.c

140
141
$(DIR)/log_proxy.o: CFLAGS += -Wall -O3
$(DIR)/log_proxy_LDFLAGS += -llog
Jeroen Vreeken's avatar
Jeroen Vreeken committed
142
143
144
145
$(DIR)/log_proxy: liblog.la
$(DIR)/log_proxy: $(DIR)/log_proxy.o
CONSOLE_SRCS += $(DIR)/log_proxy.c

146
147
$(DIR)/spg_auth.o: CFLAGS += -Wall -O3
$(DIR)/spg_auth_LDFLAGS += -lcommand
Jeroen Vreeken's avatar
Jeroen Vreeken committed
148
149
150
151
$(DIR)/spg_auth: libcommand.la
$(DIR)/spg_auth: $(DIR)/spg_auth.o
CONSOLE_SRCS += $(DIR)/spg_auth.c

152
153
$(DIR)/console_sattracker.o: CFLAGS += -Wall -O3
$(DIR)/console_sattracker_LDFLAGS += -lcommand -lnova -lpredict
154
$(DIR)/console_sattracker: libcommand.la libpredict.la
Jeroen Vreeken's avatar
Jeroen Vreeken committed
155
156
157
$(DIR)/console_sattracker: $(DIR)/console_sattracker.o
CONSOLE_SRCS += $(DIR)/console_sattracker.c

Jeroen Vreeken's avatar
Jeroen Vreeken committed
158
$(DIR)/console_httpd.o: CFLAGS += -Wall -O3
Jeroen Vreeken's avatar
Jeroen Vreeken committed
159
$(DIR)/console_httpd_LDFLAGS += -llog -ltrace -lcommand -lwebsockets -lmagic
160
$(DIR)/console_httpd: liblog.la libtrace.la libcommand.la
Jeroen Vreeken's avatar
Jeroen Vreeken committed
161
162
163
$(DIR)/console_httpd: $(DIR)/console_httpd.o
CONSOLE_SRCS += $(DIR)/console_httpd.c

Jeroen Vreeken's avatar
Jeroen Vreeken committed
164
165
166
167

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