File: Makefile

package info (click to toggle)
foundry 0.0.20130809-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 632 kB
  • ctags: 2,340
  • sloc: cpp: 6,376; yacc: 366; makefile: 192; lex: 184
file content (50 lines) | stat: -rw-r--r-- 724 bytes parent folder | download
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
TREESOURCES = $(wildcard *.ftree)

SOURCES = $(wildcard *.cpp)

OBJECTS = $(SOURCES:.cpp=.o) $(TREESOURCES:.ftree=_tree.o)
DEPENDS = $(OBJECTS:%.o=.%.d)

override CXXFLAGS += -I.

all:: foundry-build

install:

test check: all

update: all

distclean: clean

clean::
	$(RM) foundry-build

foundry-build: $(OBJECTS)
	$(CXX) $(LDFLAGS) -o $@ $^

%.o: %.cpp
	$(CXX) $(CXXFLAGS) -MD -MF .$*.d -o $@ -c $<

clean::
	$(RM) *.o

%_tree.cpp: ../lang/foundry-tree %.ftree
	$^ -c -o $@

clean::
	$(RM) $(TREESOURCES:.ftree=_tree.cpp)

%_tree.hpp: ../lang/foundry-tree %.ftree
	$^ -o $@

clean::
	$(RM) $(TREESOURCES:.ftree=_tree.hpp)

sinclude $(DEPENDS)

.%.d:
	@echo "$*.o: $(TREESOURCES:.ftree=_tree.hpp)" >$@

clean::
	$(RM) .*.d