Debian Codegraph @

examples/c/Makefile

raw symbols SCIP
1 # This Makefile was tested with GNU Make
2 CC=gcc
3
4 # Use pkg-config to lookup the proper compiler and linker flags for LCM
5 CFLAGS=`pkg-config --cflags lcm`
6 LDFLAGS=`pkg-config --libs lcm`
7
8 all: listener \
9 listener-async \
10 send-message \
11 read-log
12
13 listener: exlcm_example_t.o listener.o
14 $(CC) -o $@ $^ $(LDFLAGS)
15
16 listener-async: exlcm_example_t.o listener-async.o
17 $(CC) -o $@ $^ $(LDFLAGS)
18
19 listener-glib: exlcm_example_t.o listener-glib.o
20 $(CC) -o $@ $^ $(LDFLAGS)
21
22 send-message: exlcm_example_t.o send_message.o
23 $(CC) -o $@ $^ $(LDFLAGS)
24
25 read-log: exlcm_example_t.o read_log.o
26 $(CC) -o $@ $^ $(LDFLAGS)
27
28 # prevent auto-generated lcm .c/.h files from being deleted
29 .SECONDARY : exlcm_example_t.c exlcm_example_t.h
30
31 %.o: %.c %.h
32 $(CC) $(CFLAGS) -c $<
33
34 exlcm_%.c exlcm_%.h: ../types/%.lcm
35 lcm-gen -c $<
36
37 clean:
38 rm -f listener listener-async listener-glib send-message read-log
39 rm -f *.o
40 rm -f exlcm_example_t.c exlcm_example_t.h