Statistics
| Revision:

root / trunk / src / nh99 / GNUmakefile @ 1086

History | View | Annotate | Download (833 Bytes)

1 1086 johnoel
ifeq ($(OS),Windows_NT)
2
  ifeq ($(TERM),cygwin)
3
    TERMINAL=cygwin
4
  else
5
    TERMINAL=dos
6
    PATH:=$(PATH);..\..\utilities;..\..\utilities\mingw\bin
7
  endif
8
endif
9
10 1085 johnoel
ifeq ($(TERMINAL),dos)
11
bins: $(DISKDIR)\bin\tpl2cpp.exe
12
13 1086 johnoel
$(DISKDIR)\bin\tpl2cpp.exe: tpl2cpp.c
14 1085 johnoel
	$(CC) $(CFLAGS) -Wno-format -o $@ $<
15 1086 johnoel
16
tpl2cpp.c: lex.yy.c
17
	sed -f sedflex lex.yy.c > $@
18
19
lex.yy.c: tpl2cpp.lex
20
	flex tpl2cpp.lex
21 1085 johnoel
else
22 897 johnoel
bins: $(DISKDIR)/bin/tpl2cpp
23 1 johnoel
24 30 johnoel
$(DISKDIR)/bin/tpl2cpp: tpl2cpp.c
25 73 johnoel
ifeq ("$(CC)","cc")
26
	$(CC) -o $@ $<
27
else
28 378 johnoel
	$(CC) $(CFLAGS) -Wno-format -o $@ $<
29 73 johnoel
endif
30 1 johnoel
31 851 johnoel
tpl2cpp.c: lex.yy.c
32
	if [ "`cat $^ | wc -l`" -ne 0 ]; then sed -f sedflex $^ > $@; else rm -vf $@; fi
33 890 johnoel
	if [ ! -f $@ ]; then cp -vf tpl2cpp-unixflex.c $@; fi
34 851 johnoel
lex.yy.c: tpl2cpp.lex
35
	if [ `command -v flex` ]; then flex -v -w $^; else rm -vf $@; fi
36
	if [ ! -f $@ ]; then touch $@; fi
37 936 johnoel
endif