Makefile 2.92 KB
Newer Older
1
2
include ../build.mk

Jeroen Vreeken's avatar
Jeroen Vreeken committed
3
CFLAGS= -Wall -O3 -I../../common/utils \
4
5
6
7
8
	-I../controller \
	-Iaalib -Ipredictlib \
	-I../../common/trace \
	-I../../common/include \
	-I../../common/log \
9
10
	-I../../include \
	-I../../common
Jeroen Vreeken's avatar
Jeroen Vreeken committed
11

12
LDFLAGS+= -L../../common/lib/ -L../../lib/ -L./lib -lutils -ltrace -llog
Jeroen Vreeken's avatar
Jeroen Vreeken committed
13
14

LIBNOVA=-lnova -L../../lib/
Jeroen Vreeken's avatar
Jeroen Vreeken committed
15

16
17
RELEASE_FILE=../../release/console.tar.gz
		
18
all: lib/libaa.la lib/libpredict.la \
19
	console_joystick command_shell \
20
	console_moontracker \
21
	trace_proxy trace_log \
22
	console_j2000tracker console_j2000tracer console_j2000_indi \
23
	log_proxy spg_auth console_idle \
24
	console_suntracker console_azel console_manual \
25
	console_weather console_dt_model \
26
	await_controller \
Jeroen Vreeken's avatar
Jeroen Vreeken committed
27
	console_sattracker \
Jeroen Vreeken's avatar
Jeroen Vreeken committed
28
	mod_websocket_dt/mod_websocket_dt.so \
Jeroen Vreeken's avatar
Jeroen Vreeken committed
29

30

31
32
33
34
35
$(RELEASE_FILE): all
	tar -C $(@D) -zhcvf $@ console

release: $(RELEASE_FILE)

36
await_controller: await_controller.o
37

38
39
console_joystick_LDFLAGS= -lcommand
console_joystick: console_joystick.o
40

41
42
command_shell_LDFLAGS= -lcommand
command_shell: command_shell.o
43

44
45
console_moontracker_LDFLAGS= -lm -lpthread -laa -lcommand
console_moontracker: console_moontracker.o lib/libaa.la
46

47
48
console_j2000tracker_LDFLAGS=$(LIBNOVA) -lpthread -lm -lcommand
console_j2000tracker: console_j2000tracker.o
49

Jeroen Vreeken's avatar
Jeroen Vreeken committed
50
console_j2000tracer_LDFLAGS=$(LIBNOVA) -lm
51
console_j2000tracer: console_j2000tracer.o
52

Jeroen Vreeken's avatar
Jeroen Vreeken committed
53
console_j2000_indi_LDFLAGS= -lindi -lindidriver -lm $(LIBNOVA)
54
console_j2000_indi: console_j2000_indi.o
55

56
57
console_azel_LDFLAGS= -lcommand
console_azel: console_azel.o
58

59
60
console_manual_LDFLAGS= -lcommand
console_manual: console_manual.o
61

62
63
console_suntracker_LDFLAGS= -lm -lpthread -laa -lcommand
console_suntracker: console_suntracker.o lib/libaa.la
64

65
66
console_idle_LDFLAGS= -lcommand
console_idle: console_idle.o
67

68
69
70
71
72
73
console_weather_LDFLAGS= -lpthread
console_weather: console_weather.o

console_dt_model.o_CFLAGS+=`pkg-config --cflags glib-2.0`
console_dt_model_LDFLAGS+=`pkg-config --libs glib-2.0`
console_dt_model: console_dt_model.o
74

75
trace_proxy: trace_proxy.o
76

77
trace_log: trace_log.o
78

79
log_proxy: log_proxy.o
80

81
82
spg_auth_LDFLAGS= -lcommand
spg_auth: spg_auth.o
83

84
85
console_sattracker_LDFLAGS= -lpthread $(LIBNOVA) -lm -lpredict -lcommand
console_sattracker: console_sattracker.o lib/libpredict.la
86

87
lib/libaa.la:
88
89
90
91
92
	@$(MAKE) -C aalib

doc:
	@$(MAKE) -C doc

93
lib/libpredict.la:
94
95
	@$(MAKE) -C predictlib

Jeroen Vreeken's avatar
Jeroen Vreeken committed
96
97
98
99
100

mod_websocket_dt/mod_websocket_dt.so:
	@$(MAKE) -C mod_websocket_dt


101
.PHONY: doc
102
103

clean:
104
	rm -rf *.o *.d lib/* *.lo *.a *.la .libs
105
	rm -f \
106
	    await_controller \
107
108
	    command_shell \
	    console_joystick \
109
	    console_dt_model \
110
111
112
113
114
115
116
117
118
119
120
121
	    console_manual \
	    console_moontracker \
	    console_suntracker \
	    console_j2000tracker \
	    console_j2000tracer \
	    console_j2000_indi \
	    console_azel \
	    console_idle \
	    console_sattracker \
	    console_weather \
	    log_proxy \
	    spg_auth \
122
123
	    trace_proxy \
	    trace_proxy \
124
	    trace_log
125
126
127
	$(MAKE) -C aalib clean
	$(MAKE) -C doc clean
	$(MAKE) -C predictlib clean
Jeroen Vreeken's avatar
Jeroen Vreeken committed
128
	$(MAKE) -C mod_websocket_dt clean
Jeroen Vreeken's avatar
Jeroen Vreeken committed
129
130