Statistics
| Revision:

root / trunk / src / nh99 / GNUmakefile @ 1471

History | View | Annotate | Download (675 Bytes)

1
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
2
bins: $(DIST)\bin\tpl2cpp.exe
3

    
4
$(DIST)\bin\tpl2cpp.exe: tpl2cpp.c
5
	$(CC) $(CFLAGS) -Wno-format -o $@ $<
6

    
7
tpl2cpp.c: lex.yy.c
8
	sed -f sedflex lex.yy.c > $@
9

    
10
lex.yy.c: tpl2cpp.lex
11
	flex tpl2cpp.lex
12
else
13
bins: $(DIST)/bin/tpl2cpp
14

    
15
$(DIST)/bin/tpl2cpp: tpl2cpp.c
16
ifeq ("$(CC)","cc")
17
	$(CC) -o $@ $<
18
else
19
	$(CC) $(CFLAGS) -Wno-format -o $@ $<
20
endif
21

    
22
tpl2cpp.c: lex.yy.c
23
	if [ "`cat $^ | wc -l`" -ne 0 ]; then sed -f sedflex $^ > $@; else rm -vf $@; fi
24
	if [ ! -f $@ ]; then cp -vf tpl2cpp-unixflex.c $@; fi
25
lex.yy.c: tpl2cpp.lex
26
	if [ `command -v flex` ]; then flex -v -w $^; else rm -vf $@; fi
27
	if [ ! -f $@ ]; then touch $@; fi
28
endif