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/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
Note: See TracChangeset for help on using the changeset viewer.