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

Jeroen Vreeken's avatar
Jeroen Vreeken committed
3
CFLAGS= -Wall -g -I../../common/utils -I../controller -Iaalib -Ipredictlib -I../../common/trace -I../../common/include -I../../include
Jeroen Vreeken's avatar
Jeroen Vreeken committed
4

5
LDFLAGS+= -L../../common/lib/ -L../../lib/ -L./lib -lutils -ltrace -static
Jeroen Vreeken's avatar
Jeroen Vreeken committed
6
7

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

9
10
RELEASE_FILE=../../release/console.tar.gz
		
11
all: lib/libaa.la lib/libpredict.la \
12
	setpoint.o console_joystick command_shell \
13
14
	spg_list spg_log_parser \
	console_moontracker \
Jeroen Vreeken's avatar
Jeroen Vreeken committed
15
16
	console_httptrace \
	trace_proxy trace.cgi_install trace_log \
17
18
19
	console_j2000tracker console_j2000tracer console_j2000_indi \
	log_proxy spg_auth console_idle console_zenith \
	console_suntracker console_azel console_manual \
20
	console_weather console_dt_model \
21
	await_controller \
Jeroen Vreeken's avatar
Jeroen Vreeken committed
22
23
24
	console_sattracker \
	status.cgi_install command.cgi_install shell.cgi_install

25

26
27
28
29
30
$(RELEASE_FILE): all
	tar -C $(@D) -zhcvf $@ console

release: $(RELEASE_FILE)

31
await_controller: await_controller.o
32

33
console_httptrace: console_httptrace.o
34

35
console_joystick: console_joystick.o setpoint.o
36

37
command_shell: command_shell.o setpoint.o
38

39
spg_list: spg_list.o
40

41
spg_log_parser: spg_log_parser.o
42

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

Jeroen Vreeken's avatar
Jeroen Vreeken committed
46
console_j2000tracker_LDFLAGS=$(LIBNOVA) -lpthread -lm
47
console_j2000tracker: console_j2000tracker.o setpoint.o
48

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

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

55
console_azel: console_azel.o setpoint.o
56

57
console_manual: console_manual.o setpoint.o
58

59
console_suntracker_LDFLAGS= -lm -lpthread -laa
60
console_suntracker: console_suntracker.o setpoint.o lib/libaa.la
61

62
console_idle: console_idle.o setpoint.o
63

64
65
66
67
68
69
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
70

71
console_zenith: console_zenith.o setpoint.o
72

73
trace_proxy: trace_proxy.o
74

75
trace.cgi: trace.cgi.o
76

Jeroen Vreeken's avatar
Jeroen Vreeken committed
77
trace.cgi_install: trace.cgi
78
	@echo "     CP trace.cgi"
Jeroen Vreeken's avatar
Jeroen Vreeken committed
79
	@cp trace.cgi ../htdocs
80
81


82
trace_log: trace_log.o
83

84
log_proxy: log_proxy.o
85

86
spg_auth: spg_auth.o setpoint.o
87

88
console_sattracker_LDFLAGS= -lpthread $(LIBNOVA) -lm -lpredict
89
console_sattracker: console_sattracker.o setpoint.o lib/libpredict.la
90

91
command.cgi: command.cgi.o
Jeroen Vreeken's avatar
Jeroen Vreeken committed
92
93

command.cgi_install: command.cgi
94
	@echo "     CP command.cgi"
Jeroen Vreeken's avatar
Jeroen Vreeken committed
95
96
	@cp command.cgi ../htdocs

97
shell.cgi: shell.cgi.o
Jeroen Vreeken's avatar
Jeroen Vreeken committed
98
99

shell.cgi_install: shell.cgi
100
	@echo "     CP shell.cgi"
Jeroen Vreeken's avatar
Jeroen Vreeken committed
101
102
	@cp shell.cgi ../htdocs

103
status.cgi: status.cgi.o
Jeroen Vreeken's avatar
Jeroen Vreeken committed
104
105

status.cgi_install: status.cgi
106
	@echo "     CP status.cgi"
Jeroen Vreeken's avatar
Jeroen Vreeken committed
107
108
	@cp status.cgi ../htdocs

109
lib/libaa.la:
110
111
112
113
114
	@$(MAKE) -C aalib

doc:
	@$(MAKE) -C doc

115
lib/libpredict.la:
116
117
	@$(MAKE) -C predictlib

118
.PHONY: doc
119
120

clean:
121
	rm -rf *.o *.d lib/* *.lo *.a *.la .libs
122
	rm -f \
123
124
	    await_controller \
	    command.cgi \
125
126
	    command_shell \
	    console_joystick \
127
	    console_dt_model \
128
129
130
131
132
133
134
135
136
137
138
139
140
	    console_httptrace \
	    console_manual \
	    console_moontracker \
	    console_suntracker \
	    console_j2000tracker \
	    console_j2000tracer \
	    console_j2000_indi \
	    console_azel \
	    console_idle \
	    console_sattracker \
	    console_weather \
	    console_zenith \
	    log_proxy \
141
	    shell.cgi \
142
	    spg_auth \
143
	    spg_list \
144
	    spg_log_parser \
145
	    status.cgi \
146
147
148
	    trace_proxy \
	    trace_proxy \
	    trace_log \
149
	    trace.cgi
150
151
152
153
	$(MAKE) -C aalib clean
	$(MAKE) -C doc clean
	$(MAKE) -C predictlib clean

Jeroen Vreeken's avatar
Jeroen Vreeken committed
154
155
156