Statistics
| Revision:

root / trunk / src / nh99 / GNUmakefile @ 1124

History | View | Annotate | Download (836 Bytes)

1
ifeq ($(OS),Windows_NT)
2
  ifeq ("$(TERM)","xterm")
3
    TERMINAL=cygwin
4
  else
5
    TERMINAL=dos
6
    PATH:=$(PATH);..\..\utilities;..\..\utilities\mingw\bin
7
  endif
8
endif
9

    
10
ifeq ($(TERMINAL),dos)
11
bins: $(DISKDIR)\bin\tpl2cpp.exe
12

    
13
$(DISKDIR)\bin\tpl2cpp.exe: tpl2cpp.c
14
	$(CC) $(CFLAGS) -Wno-format -o $@ $<
15

    
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
else
22
bins: $(DISKDIR)/bin/tpl2cpp
23

    
24
$(DISKDIR)/bin/tpl2cpp: tpl2cpp.c
25
ifeq ("$(CC)","cc")
26
	$(CC) -o $@ $<
27
else
28
	$(CC) $(CFLAGS) -Wno-format -o $@ $<
29
endif
30

    
31
tpl2cpp.c: lex.yy.c
32
	if [ "`cat $^ | wc -l`" -ne 0 ]; then sed -f sedflex $^ > $@; else rm -vf $@; fi
33
	if [ ! -f $@ ]; then cp -vf tpl2cpp-unixflex.c $@; fi
34
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
endif