Changeset 1479


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

build: simplify the .lolfx file compilation.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/.gitignore

    r1451 r1479  
    7474tools/make-font
    7575# Our data
    76 *.lolfx.cpp
  • trunk/neercs/Makefile.am

    r1467 r1479  
    77    neercs.cpp neercs.h \
    88    \
    9     video/render.cpp video/render.h
    10 nodist_neercs_SOURCES = \
    11     video/blurh.lolfx.cpp video/blurv.lolfx.cpp video/glow.lolfx.cpp \
    12     video/postfx.lolfx.cpp video/radial.lolfx.cpp video/simple.lolfx.cpp \
    13     video/text.lolfx.cpp
     9    video/render.cpp video/render.h \
     10    video/blurh.lolfx video/blurv.lolfx video/glow.lolfx \
     11    video/postfx.lolfx video/radial.lolfx video/simple.lolfx \
     12    video/text.lolfx
    1413neercs_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
    1514neercs_LDADD =
     
    2221CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
    2322             $(noinst_PROGRAMS:%$(EXEEXT)=%.elf) \
    24              $(noinst_PROGRAMS:%$(EXEEXT)=%.exe) \
    25              $(filter %.lolfx.cpp, $(SOURCES))
     23             $(noinst_PROGRAMS:%$(EXEEXT)=%.exe)
    2624
    2725SUFFIXES = .lolfx
    28 %.lolfx.cpp: %.lolfx
    29         echo "/* This file was autogenerated. DO NOT MODIFY IT. */" > $@.tmp
    30         echo "char const *lolfx_$(notdir $(^:%.lolfx=%)) =" >> $@.tmp
    31         $(SED) 's/"/\\"/g' $^ | $(SED) 's/\([^\r]*\).*/"\1\\n"/' >> $@.tmp
    32         echo ";" >> $@.tmp
    33         mv $@.tmp $@
     26.lolfx.o:
     27        (echo "char const *"; \
     28         echo "lolfx_$(notdir $(basename $(filter %.lolfx, $^))) ="; \
     29         $(SED) 's/"/\\"/g' $(filter %.lolfx, $^) | \
     30         $(SED) 's/\([^\r]*\).*/"\1\\n"/'; \
     31         echo ";") | $(CXXCOMPILE) -xc++ -c - -o $@
    3432
  • trunk/orbital/Makefile.am

    r1453 r1479  
    66    particlesystem.h tank.h player.h gun.h snake.h starfield.h \
    77    \
     8    shiny.lolfx \
     9    \
    810    mesh.cpp mesh.h mesh-compiler.cpp mesh-compiler.h \
    911    generated/mesh-scanner.cpp generated/mesh-parser.cpp \
     
    1113    gun.cpp gun.h gun-compiler.cpp gun-compiler.h \
    1214    generated/gun-scanner.cpp generated/gun-parser.cpp
    13 nodist_orbital_SOURCES = \
    14     shiny.lolfx.cpp
    1515orbital_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
    1616orbital_LDADD =
     
    3838CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
    3939             $(noinst_PROGRAMS:%$(EXEEXT)=%.elf) \
    40              $(noinst_PROGRAMS:%$(EXEEXT)=%.exe) \
    41              $(filter %.lolfx.cpp, $(SOURCES))
     40             $(noinst_PROGRAMS:%$(EXEEXT)=%.exe)
    4241
    4342SUFFIXES = .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/\([^\r]*\).*/"\1\\n"/' >> $@.tmp
    48         echo ";" >> $@.tmp
    49         mv $@.tmp $@
     43.lolfx.o:
     44        (echo "char const *"; \
     45         echo "lolfx_$(notdir $(basename $(filter %.lolfx, $^))) ="; \
     46         $(SED) 's/"/\\"/g' $(filter %.lolfx, $^) | \
     47         $(SED) 's/\([^\r]*\).*/"\1\\n"/'; \
     48         echo ";") | $(CXXCOMPILE) -xc++ -c - -o $@
    5049
  • trunk/src/Makefile.am

    r1455 r1479  
    3737    gpu/vertexbuffer.cpp gpu/vertexbuffer.h \
    3838    gpu/framebuffer.cpp gpu/framebuffer.h \
     39    gpu/defaultmaterial.lolfx \
     40    gpu/emptymaterial.lolfx \
     41    gpu/testmaterial.lolfx \
    3942    \
    4043    image/image.cpp image/image.h image/image-private.h \
     
    4750    debug/record.cpp debug/record.h debug/stats.cpp debug/stats.h \
    4851    debug/quad.cpp debug/quad.h
    49 nodist_liblol_a_SOURCES = \
    50     gpu/defaultmaterial.lolfx.cpp \
    51     gpu/emptymaterial.lolfx.cpp \
    52     gpu/testmaterial.lolfx.cpp
    5352liblol_a_CPPFLAGS = @LOL_CFLAGS@
    5453
    55 CLEANFILES = $(filter %.lolfx.cpp, $(SOURCES))
    56 
    5754SUFFIXES = .lolfx
    58 %.lolfx.cpp: %.lolfx
    59         echo "/* This file was autogenerated. DO NOT MODIFY IT. */" > $@.tmp
    60         echo "char const *lolfx_$(notdir $(^:%.lolfx=%)) =" >> $@.tmp
    61         $(SED) 's/"/\\"/g' $^ | $(SED) 's/\([^\r]*\).*/"\1\\n"/' >> $@.tmp
    62         echo ";" >> $@.tmp
    63         mv $@.tmp $@
     55.lolfx.o:
     56        (echo "char const *"; \
     57         echo "lolfx_$(notdir $(basename $(filter %.lolfx, $^))) ="; \
     58         $(SED) 's/"/\\"/g' $(filter %.lolfx, $^) | \
     59         $(SED) 's/\([^\r]*\).*/"\1\\n"/'; \
     60         echo ";") | $(CXXCOMPILE) -xc++ -c - -o $@
    6461
    6562sdl_sources = \
  • 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.