Ignore:
Timestamp:
Jun 15, 2012, 1:09:32 PM (8 years ago)
Author:
sam
Message:

build: simplify the .lolfx file compilation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/tutorial/Makefile.am

    r1453 r1479  
    99CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
    1010             $(noinst_PROGRAMS:%$(EXEEXT)=%.elf) \
    11              $(noinst_PROGRAMS:%$(EXEEXT)=%.exe) \
    12              $(filter %.lolfx.cpp, $(SOURCES))
     11             $(noinst_PROGRAMS:%$(EXEEXT)=%.exe)
    1312
    1413SUFFIXES = .lolfx
    15 %.lolfx.cpp: %.lolfx
    16         echo "/* This file was autogenerated. DO NOT MODIFY IT. */" > $@.tmp
    17         echo "char const *lolfx_$(notdir $(^:%.lolfx=%)) =" >> $@.tmp
    18         $(SED) 's/"/\\"/g' $^ | $(SED) 's/\([^\r]*\).*/"\1\\n"/' >> $@.tmp
    19         echo ";" >> $@.tmp
    20         mv $@.tmp $@
     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 $@
    2120
    2221noinst_PROGRAMS = 01_triangle 02_cube 03_fractal
    2322
    24 01_triangle_SOURCES = 01_triangle.cpp
    25 nodist_01_triangle_SOURCES = 01_triangle.lolfx.cpp
     2301_triangle_SOURCES = 01_triangle.cpp 01_triangle.lolfx
    262401_triangle_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
    272501_triangle_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
    282601_triangle_DEPENDENCIES = $(top_builddir)/src/liblol.a
    2927
    30 02_cube_SOURCES = 02_cube.cpp
    31 nodist_02_cube_SOURCES = 02_cube.lolfx.cpp
     2802_cube_SOURCES = 02_cube.cpp 02_cube.lolfx
    322902_cube_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
    333002_cube_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
    343102_cube_DEPENDENCIES = $(top_builddir)/src/liblol.a
    3532
    36 03_fractal_SOURCES = 03_fractal.cpp
    37 nodist_03_fractal_SOURCES = 03_fractal.lolfx.cpp
     3303_fractal_SOURCES = 03_fractal.cpp 03_fractal.lolfx
    383403_fractal_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
    393503_fractal_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
Note: See TracChangeset for help on using the changeset viewer.