source: trunk/orbital/Makefile.am @ 1415

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

orbital: use a flex/bison scanner/parser for mesh descriptions.

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