source: trunk/orbital/Makefile.am @ 1424

Last change on this file since 1424 was 1424, checked in by sam, 9 years ago

orbital: port the gun command compiler to our bison/flex system.

File size: 1.6 KB
Line 
1
2noinst_PROGRAMS = orbital
3
4orbital_SOURCES = \
5    orbital.cpp orbital.h \
6    particlesystem.h tank.h player.h gun.h snake.h starfield.h \
7    \
8    mesh.cpp mesh.h mesh-compiler.cpp mesh-compiler.h \
9    generated/mesh-scanner.cpp generated/mesh-parser.cpp \
10    \
11    gun.cpp gun.h gun-compiler.cpp gun-compiler.h \
12    generated/gun-scanner.cpp generated/gun-parser.cpp
13nodist_orbital_SOURCES = \
14    shiny.lolfx.cpp
15orbital_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
16orbital_LDADD =
17orbital_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
18orbital_DEPENDENCIES = $(top_builddir)/src/liblol.a
19
20all-local: orbital$(EXEEXT)
21        test $(MAKE_FSELF) = no || make_fself orbital$(EXEEXT) orbital.self
22
23if TRUE
24generated: .FORCE
25        $(MKDIR_P) generated
26        rm -f generated/[a-zA-Z]*
27        flex -o generated/mesh-scanner.cpp mesh-scanner.l
28        flex -o generated/gun-scanner.cpp gun-scanner.l
29        bison -o generated/mesh-parser.cpp --defines=generated/mesh-parser.h \
30              -d -b generated/mesh mesh-parser.y
31        bison -o generated/gun-parser.cpp --defines=generated/gun-parser.h \
32              -d -b generated/gun gun-parser.y
33.FORCE:
34endif
35
36EXTRA_DIST = mesh-scanner.l mesh-parser.y \
37             gun-scanner.l gun-parser.y
38CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
39             $(noinst_PROGRAMS:%$(EXEEXT)=%.elf) \
40             $(noinst_PROGRAMS:%$(EXEEXT)=%.exe) \
41             $(filter %.lolfx.cpp, $(SOURCES))
42
43SUFFIXES = .lolfx
44%.lolfx.cpp: %.lolfx
45        echo "/* This file was autogenerated. DO NOT MODIFY IT. */" > $@.tmp
46        echo "char const *lolfx_$(notdir $(^:%.lolfx=%)) =" >> $@.tmp
47        $(SED) 's/"/\\"/g' $^ | $(SED) 's/.*/"&\\n"/' >> $@.tmp
48        echo ";" >> $@.tmp
49        mv $@.tmp $@
50
Note: See TracBrowser for help on using the repository browser.