-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
66 lines (46 loc) · 1.35 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
include Makefile.inc
OBJS = $(patsubst %.cpp, %.o, $(wildcard *.cpp))
MODULES = buffer scan symtab pars
LIBS = libscan.a libsymtab.a libbuffer.a libpars.a
# CXXFLAGS += $(LIBS)
EXE = sysprog
all: run
$(EXE): $(OBJS) $(LIBS)
@$(CXX) $(OBJS) $(LIBS) $(CXXFLAGS) -o $(EXE)
TMP_IN = /tmp/test67.txt
TMP_OUT = /tmp/out67.txt
run: modules $(EXE)
# @cp input1 $(TMP_IN)
# @rm -f $(TMP_OUT)
# @echo Running...; echo
# @./$(EXE) parse $(TMP_IN) $(TMP_OUT)
# @mv $(TMP_OUT) out.code 2>/dev/null || true
# @rm $(TMP_IN)
# @echo; echo ...done.; echo
integration-test:
it/integration-test
modules:
@( for module in $(MODULES); do\
echo "###############";\
echo "#" $$module ;\
echo "###############";\
cd $$module && make --no-print-directory all && cd - 2>&1 >/dev/null || exit 1;\
echo "###############";\
echo "# $$module done";\
done );
@echo "###############"; echo
#clean:
# find -name '*.o' -or -name '*.a' | xargs rm -f
# rm -f $(EXE)
#$(OBJS) a.out test tags $(EXE)
# cd tests && make clean 2>/dev/null || true
include Makefile.stdrules
##################
# ctags stuff... #
##################
tags: *.cpp */*.cpp */*.hpp
ctags -R --c++-kinds=+pl --fields=+iaS --extra=+q .
tags-fetcher:
( while true; do make tags >/dev/null 2>&1 && sleep 1; done ) &
tags-fetcher-kill:
ps aux | grep 'make tags' | grep -v grep | awk '{print $$2}' | xargs kill