altos/lisp: Separate out values from atoms
[fw/altos] / src / test / Makefile
1 vpath % ..:../kernel:../drivers:../util:../micropeak:../aes:../product:../lisp
2
3 PROGS=ao_flight_test ao_flight_test_baro ao_flight_test_accel ao_flight_test_noisy_accel ao_flight_test_mm \
4         ao_flight_test_metrum \
5         ao_gps_test ao_gps_test_skytraq ao_gps_test_ublox ao_convert_test ao_convert_pa_test ao_fec_test \
6         ao_aprs_test ao_micropeak_test ao_fat_test ao_aes_test ao_int64_test \
7         ao_ms5607_convert_test ao_quaternion_test ao_lisp_test
8
9 INCS=ao_kalman.h ao_ms5607.h ao_log.h ao_data.h altitude-pa.h altitude.h ao_quaternion.h
10
11 KALMAN=make-kalman 
12
13 CFLAGS=-I.. -I. -I../kernel -I../drivers -I../micropeak -I../product -I../lisp -O0 -g -Wall -DAO_LISP_TEST
14
15 all: $(PROGS) ao_aprs_data.wav
16
17 clean:
18         rm -f $(PROGS) ao_aprs_data.wav run-out.baro run-out.full
19
20 install:
21
22 ao_flight_test: ao_flight_test.c ao_host.h ao_flight.c ao_sample.c ao_kalman.c altitude.h $(INCS)
23         cc $(CFLAGS) -o $@ $<
24
25 ao_flight_test_noisy_accel: ao_flight_test.c ao_host.h ao_flight.c ao_sample.c ao_kalman.c $(INCS)
26         cc -DNOISY_ACCEL=1 $(CFLAGS) -o $@ $<
27
28 ao_flight_test_baro: ao_flight_test.c ao_host.h ao_flight.c  ao_sample.c ao_kalman.c $(INCS)
29         cc $(CFLAGS) -o $@ -DHAS_ACCEL=0 ao_flight_test.c
30
31 ao_flight_test_accel: ao_flight_test.c ao_host.h ao_flight.c  ao_sample.c ao_kalman.c $(INCS)
32         cc $(CFLAGS) -o $@ -DFORCE_ACCEL=1 ao_flight_test.c
33
34 ao_flight_test_mm: ao_flight_test.c ao_host.h ao_flight.c ao_sample.c ao_kalman.c ao_pyro.c ao_pyro.h $(INCS)
35         cc -DTELEMEGA=1 $(CFLAGS) -o $@ $< -lm
36
37 ao_flight_test_metrum: ao_flight_test.c ao_host.h ao_flight.c ao_sample.c ao_kalman.c ao_pyro.c ao_pyro.h $(INCS)
38         cc -DTELEMETRUM_V2=1 $(CFLAGS) -o $@ $< -lm
39
40 ao_gps_test: ao_gps_test.c ao_gps_sirf.c ao_gps_print.c ao_host.h
41         cc $(CFLAGS) -o $@ $<
42
43 ao_gps_test_skytraq: ao_gps_test_skytraq.c ao_gps_skytraq.c ao_gps_print.c ao_gps_show.c ao_host.h
44         cc $(CFLAGS) -o $@ $<
45
46 ao_gps_test_ublox: ao_gps_test_ublox.c ao_gps_ublox.c ao_gps_print.c ao_gps_show.c ao_host.h ao_gps_ublox.h
47         cc $(CFLAGS) -o $@ $<
48
49 ao_convert_test: ao_convert_test.c ao_convert.c altitude.h
50         cc $(CFLAGS) -o $@ $<
51
52 ao_convert_pa_test: ao_convert_pa_test.c ao_convert_pa.c altitude-pa.h
53         cc $(CFLAGS) -o $@ $<
54
55 ao_kalman.h: $(KALMAN)
56         (cd .. && make ao_kalman.h)
57
58 ao_fec_test: ao_fec_test.c ao_fec_tx.c ao_fec_rx.c
59         cc $(CFLAGS) -DAO_FEC_DEBUG=1 -o $@ ao_fec_test.c ../kernel/ao_fec_tx.c ../kernel/ao_fec_rx.c -lm
60
61 ao_aprs_test: ao_aprs_test.c ao_aprs.c
62         cc $(CFLAGS) -o $@ ao_aprs_test.c -lm
63
64 SOX_INPUT_ARGS=--type raw --encoding unsigned-integer -b 8 -c 1 -r 9600
65 SOX_OUTPUT_ARGS=--type wav
66
67 ao_aprs_data.wav: ao_aprs_test
68         ./ao_aprs_test | sox $(SOX_INPUT_ARGS) - $(SOX_OUTPUT_ARGS) $@
69
70 check: ao_fec_test ao_flight_test ao_flight_test_baro run-tests
71         ./ao_fec_test && ./run-tests
72
73 ao_micropeak_test: ao_micropeak_test.c ao_microflight.c ao_kalman.h
74         cc $(CFLAGS) -o $@ ao_micropeak_test.c -lm
75
76 ao_fat_test: ao_fat_test.c ao_fat.c ao_bufio.c
77         cc $(CFLAGS) -o $@ ao_fat_test.c -lssl -lcrypto
78
79 ao_aes_test: ao_aes_test.c ao_aes.c ao_aes_tables.c
80         cc $(CFLAGS) -o $@ ao_aes_test.c
81
82 ao_int64_test: ao_int64_test.c ao_int64.c ao_int64.h
83         cc $(CFLAGS) -o $@ ao_int64_test.c
84
85 ao_ms5607_convert_test: ao_ms5607_convert_test.c ao_ms5607_convert_8051.c ao_int64.c ao_int64.h
86         cc $(CFLAGS) -o $@ ao_ms5607_convert_test.c
87
88 ao_quaternion_test: ao_quaternion_test.c ao_quaternion.h
89         cc $(CFLAGS) -o $@ ao_quaternion_test.c -lm
90
91
92 #AO_LISP_OBJS = ao_lisp_test.o ao_lisp_mem.o ao_lisp_lex.o ao_lisp_cons.o ao_lisp_string.o ao_lisp_atom.o ao_lisp_int.o ao_lisp_prim.o ao_lisp_eval.o ao_lisp_poly.o ao_lisp_builtin.o ao_lisp_read.o
93
94 AO_LISP_OBJS = ao_lisp_test.o ao_lisp_mem.o  ao_lisp_cons.o ao_lisp_string.o \
95         ao_lisp_atom.o ao_lisp_int.o ao_lisp_prim.o ao_lisp_eval.o ao_lisp_poly.o \
96         ao_lisp_builtin.o ao_lisp_read.o ao_lisp_rep.o ao_lisp_frame.o
97
98 ao_lisp_test: $(AO_LISP_OBJS)
99         cc $(CFLAGS) -o $@ $(AO_LISP_OBJS)
100
101 $(AO_LISP_OBJS): ao_lisp.h ao_lisp_const.h