4e1d6c7f |
1 | APP_NAME=ldc2 |
ea4c19a4 |
2 | APP_OBJECTS= main.o silent_code.o configuration_manager.o tool.o config.o |
c8a4d02d |
3 | CCFLAGS+=-Wall |
7880ae2d |
4 | |
5 | |
7880ae2d |
6 | BUILD_STAMP="\"`uname -a`\"" |
ea78fc91 |
7 | VERSION="\"1.0\"" |
7880ae2d |
8 | BUILD_DATE="\"`date` \"" |
9 | |
10 | CCFLAGS+=-D BUILD_STAMP=$(BUILD_STAMP) -D VERSION=$(VERSION) -D BUILD_DATE=$(BUILD_DATE) |
11 | |
12 | BLOCK_OBJECTS=tape_block.o eot_block.o data_block.o broken_block.o\ |
13 | data_block_0_10.o data_block_0_14.o data_block_0_1.o data_block_0_24.o\ |
c8a4d02d |
14 | data_block_0_2.o data_block_0_30.o data_block_0_3.o data_block_0_4.o\ |
15 | data_block_0_50.o data_block_0_54.o data_block_0_60.o data_block_0_44.o\ |
7880ae2d |
16 | data_block_0_64.o \ |
17 | data_block_0.o data_block_0_0.o\ |
c8a4d02d |
18 | data_block_0_label_extractor.o data_block_1.o data_block_2.o\ |
19 | data_block_3.o data_block_4.o data_block_5.o \ |
7880ae2d |
20 | data_block_6.o data_block_7.o |
21 | |
4e1d6c7f |
22 | |
7880ae2d |
23 | OBJECTS=$(BLOCK_OBJECTS) $(APP_OBJECTS) |
4e1d6c7f |
24 | |
0ec6e042 |
25 | SRC_DIR=src |
26 | |
27 | default: $(APP_NAME) |
28 | |
874a2bd8 |
29 | |
7880ae2d |
30 | clean: |
31 | @rm -rf $(APP_NAME) *.o doxy/ $(SRC_DIR)/*~ ul_timestamp *.dep |
32 | @$(MAKE) -C doc clean |
c8a4d02d |
33 | |
7880ae2d |
34 | APP_SOURCES=$(foreach obj, $(OBJECTS:.o=.cpp),$(SRC_DIR)/$(obj)) |
c8a4d02d |
35 | |
ea4c19a4 |
36 | %.dep : $(SRC_DIR)/%.cpp |
c8a4d02d |
37 | @ echo Building dependencies for $<. |
38 | @$(SHELL) -c "g++ -M $<" | awk 'BEGIN {N=0}{if(N==0)printf("%s %s\n","$@",$$0);else printf("%s\n", $$0);N+=1;}' > $@ |
39 | |
0ec6e042 |
40 | |
c8a4d02d |
41 | %.o : $(SRC_DIR)/%.cpp %.dep |
42 | g++ -c $(CCFLAGS) -o $@ $< |
0ec6e042 |
43 | |
7880ae2d |
44 | $(APP_NAME) : $(OBJECTS) |
45 | g++ -o$@ $^ |
c8a4d02d |
46 | |
7880ae2d |
47 | saustall: $(OBJECTS:.o=.dep) |
0ec6e042 |
48 | |
7880ae2d |
49 | doxy/timestamp: $(OBJECTS) |
0ec6e042 |
50 | @ if [ ! -d doxy ]; then mkdir doxy; fi |
51 | @doxygen Doxyfile |
52 | touch $@ |
53 | |
54 | doxy: doxy/timestamp |
7880ae2d |
55 | |
4e1d6c7f |
56 | upload: ul_timestamp |
0ec6e042 |
57 | |
4e1d6c7f |
58 | ul_timestamp: doxy/timestamp |
59 | @cd doxy/html && tar -czf /tmp/doxy.tar.gz * |
60 | @touch ul_timestamp |
61 | @scp -q /tmp/doxy.tar.gz ente:/tmp/ |
62 | @ssh ente "rm -rf h316.web/ldc-doc/* && cd h316.web/ldc-doc && tar -xzf /tmp/doxy.tar.gz" |
0ec6e042 |
63 | |
64 | doc: |
65 | $(MAKE) -C doc |
66 | |
67 | all: $(APP_NAME) doxy doc |
68 | |
7880ae2d |
69 | .PHONY: all clean doxy upload docdata_block_0_0.o default |
c8a4d02d |
70 | |
71 | .PRECIOUS: *.dep |
72 | |
7880ae2d |
73 | #$(OBJECTS:.o=.d) |
74 | |
75 | %.hh %.cpp: |
76 | @ echo "Missing file \"$@\"... No problem :-)" |
77 | |
c8a4d02d |
78 | include $(wildcard *.dep) |
7880ae2d |
79 | #include $(OBJECTS:.o=.dep) |