Proper cleaning of the compiled files.
[ruwai.git] / software / c++ / ruwaicom / src / Makefile
blob979050b5abc5873ed32bb3a17cacef497b11563e
2 # Build environment can be configured the following
3 # environment variables:
4 # CC : Specify the C compiler to use
5 # CFLAGS : Specify compiler options to use
7 # Required compiler parameters
8 CC = g++
10 CFLAGS += -I../include
11 # Create the dependency files (.d) to track header file changes.
12 CFLAGS += -MMD -MP
13 #CFLAGS += -fPIC
15 LDFLAGS = -L../lib
16 LDLIBS = -lpthread -lmseed -lboost_filesystem -lboost_system -lgpio
18 OBJS = ruwaicom.o recorder.o root.o rw_protocol.o \
19 serial_parser.o rt_server.o lcddisplay.o log_temperature.o
21 DEPS = $(OBJS:.o=.d)
23 all: ruwaicom
25 ruwaicom: $(OBJS)
26 $(MAKE) -C libgpio
27 $(MAKE) -C libgpio install
28 $(MAKE) -C libmseed
29 $(MAKE) -C libmseed install
30 $(CC) $(OBJS) -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS)
32 clean:
33 rm -f *.o
34 rm -f *.d
35 rm -f ruwaicom
36 rm -f ../lib/libmseed.a
37 rm -f ../lib/libgpio.a
38 $(MAKE) -C libgpio clean
39 $(MAKE) -C libmseed clean
43 install:
44 @echo
45 @echo "No install target, copy the executable(s) as needed"
46 @echo
48 .SUFFIXES: .cpp
49 .cpp.o:
50 $(CC) -std=c++11 -Wall -pedantic -c $< -o $@ $(CFLAGS)
53 # Include the dependency files.
54 -include $(DEPS)