Statistics
| Revision:

root / trunk / src / nh99 / GNUmakefile @ 1125

History | View | Annotate | Download (925 Bytes)

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

    
15
ifeq ($(TERMINAL),dos)
16
bins: $(DISKDIR)\bin\tpl2cpp.exe
17

    
18
$(DISKDIR)\bin\tpl2cpp.exe: tpl2cpp.c
19
	$(CC) $(CFLAGS) -Wno-format -o $@ $<
20

    
21
tpl2cpp.c: lex.yy.c
22
	sed -f sedflex lex.yy.c > $@
23

    
24
lex.yy.c: tpl2cpp.lex
25
	flex tpl2cpp.lex
26
else
27
bins: $(DISKDIR)/bin/tpl2cpp
28

    
29
$(DISKDIR)/bin/tpl2cpp: tpl2cpp.c
30
ifeq ("$(CC)","cc")
31
	$(CC) -o $@ $<
32
else
33
	$(CC) $(CFLAGS) -Wno-format -o $@ $<
34
endif
35

    
36
tpl2cpp.c: lex.yy.c
37
	if [ "`cat $^ | wc -l`" -ne 0 ]; then sed -f sedflex $^ > $@; else rm -vf $@; fi
38
	if [ ! -f $@ ]; then cp -vf tpl2cpp-unixflex.c $@; fi
39
lex.yy.c: tpl2cpp.lex
40
	if [ `command -v flex` ]; then flex -v -w $^; else rm -vf $@; fi
41
	if [ ! -f $@ ]; then touch $@; fi
42
endif