source: trunk/test/tutorial/Makefile.am @ 1479

Last change on this file since 1479 was 1479, checked in by sam, 11 years ago

build: simplify the .lolfx file compilation.

File size: 1.3 KB
RevLine 
[1043]1
2AM_CPPFLAGS = -I$(top_srcdir)/src
3
4all-local: $(noinst_PROGRAMS)
[1291]5        for x in $(noinst_PROGRAMS:%$(EXEEXT)=%); do \
[1242]6          test x$(MAKE_FSELF) = xno || make_fself $${x}$(EXEEXT) $${x}.self; \
7        done
[1043]8
9CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
10             $(noinst_PROGRAMS:%$(EXEEXT)=%.elf) \
[1479]11             $(noinst_PROGRAMS:%$(EXEEXT)=%.exe)
[1043]12
[1385]13SUFFIXES = .lolfx
[1479]14.lolfx.o:
15        (echo "char const *"; \
16         echo "lolfx_$(notdir $(basename $(filter %.lolfx, $^))) ="; \
17         $(SED) 's/"/\\"/g' $(filter %.lolfx, $^) | \
18         $(SED) 's/\([^\r]*\).*/"\1\\n"/'; \
19         echo ";") | $(CXXCOMPILE) -xc++ -c - -o $@
[1385]20
[1242]21noinst_PROGRAMS = 01_triangle 02_cube 03_fractal
[1043]22
[1479]2301_triangle_SOURCES = 01_triangle.cpp 01_triangle.lolfx
[1242]2401_triangle_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
2501_triangle_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
2601_triangle_DEPENDENCIES = $(top_builddir)/src/liblol.a
[1043]27
[1479]2802_cube_SOURCES = 02_cube.cpp 02_cube.lolfx
[1242]2902_cube_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
3002_cube_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
3102_cube_DEPENDENCIES = $(top_builddir)/src/liblol.a
[1043]32
[1479]3303_fractal_SOURCES = 03_fractal.cpp 03_fractal.lolfx
[1242]3403_fractal_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
3503_fractal_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
3603_fractal_DEPENDENCIES = $(top_builddir)/src/liblol.a
[1054]37
Note: See TracBrowser for help on using the repository browser.