source: trunk/orbital/Makefile.am @ 1416

Last change on this file since 1416 was 1416, checked in by sam, 8 years ago

orbital: parser for the gun commands... fails to link because of flex.

File size: 1.4 KB
Line 
1
2noinst_PROGRAMS = orbital
3
4orbital_SOURCES = \
5    orbital.cpp orbital.h \
6    mesh.cpp mesh.h \
7    gun.cpp gun.h \
8    particlesystem.h tank.h player.h gun.h snake.h starfield.h
9nodist_orbital_SOURCES = \
10    shiny.lolfx.cpp
11orbital_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
12orbital_LDADD =
13orbital_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
14orbital_DEPENDENCIES = $(top_builddir)/src/liblol.a \
15    generated/mesh-scanner.cpp \
16    generated/mesh-parser.cpp \
17    generated/gun-scanner.cpp \
18    generated/gun-parser.cpp
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        flex -o generated/mesh-scanner.cpp mesh.l
27        bison -o generated/mesh-parser.cpp -d -b generated/mesh mesh.yy
28        flex -o generated/gun-scanner.cpp gun.l
29        bison -o generated/gun-parser.cpp -d -b generated/gun gun.yy
30.FORCE:
31endif
32
33EXTRA_DIST = mesh.l mesh.yy
34CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
35             $(noinst_PROGRAMS:%$(EXEEXT)=%.elf) \
36             $(noinst_PROGRAMS:%$(EXEEXT)=%.exe) \
37             $(filter %.lolfx.cpp, $(SOURCES))
38
39SUFFIXES = .lolfx
40%.lolfx.cpp: %.lolfx
41        echo "/* This file was autogenerated. DO NOT MODIFY IT. */" > $@.tmp
42        echo "char const *lolfx_$(notdir $(^:%.lolfx=%)) =" >> $@.tmp
43        $(SED) 's/"/\\"/g' $^ | $(SED) 's/.*/"&\\n"/' >> $@.tmp
44        echo ";" >> $@.tmp
45        mv $@.tmp $@
46
Note: See TracBrowser for help on using the repository browser.