Changeset 1981


Ignore:
Timestamp:
Oct 6, 2012, 12:42:06 AM (5 years ago)
Author:
sam
Message:

ps3: refactor elf → self build logic and make make_fself mandatory
when building for the PS3 on a Unix system.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/build/autotools/common.am

    r1939 r1981  
     1
     2#
     3# Define these variables from the beginning
     4#
     5
     6CLEANFILES =
     7SUFFIXES =
     8
     9
     10#
     11# Miscellaneous rules
     12#
    113
    214lol_recursive_rule = \
    315        @if test -n "$(SUBDIRS)"; then for subdir in $(SUBDIRS); do \
    4             ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $(patsubst %-recursive, %, $@)) || exit 1; \
    5           done; \
    6         fi
     16          ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $(patsubst %-recursive, %, $@)) || exit 1; \
     17        done; fi
    718
    819bench: bench-recursive
     
    4758lolfx_gen_0 = @echo "  LOLFX " $@;
    4859
    49 SUFFIXES = .lolfx
     60SUFFIXES += .lolfx
    5061.lolfx.o:
    5162        $(lolfx_gen)
     
    5869
    5970#
     71# PS3 fself support rules
     72#
     73
     74fself_gen = $(fself_gen_$(V))
     75fself_gen_ = $(fself_gen_$(AM_DEFAULT_VERBOSITY))
     76fself_gen_0 = echo "  FSELF " $${x}.self;
     77fself_gen_1 = echo make_fself $${x}$(EXEEXT) $${x}.self;
     78
     79all-local: all-local-ps3
     80all-local-ps3: $(PROGRAMS) $(noinst_PROGRAMS)
     81        @if test -n "$^"; then for x in $(^:%$(EXEEXT)=%); do \
     82          if test x$(MAKE_FSELF) != xno; then \
     83            $(fself_gen) \
     84            make_fself $${x}$(EXEEXT) $${x}.self; \
     85          fi; \
     86        done; fi
     87
     88CLEANFILES += $(PROGRAMS:%$(EXEEXT)=%.self) \
     89              $(PROGRAMS:%$(EXEEXT)=%.elf) \
     90              $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
     91              $(noinst_PROGRAMS:%$(EXEEXT)=%.elf)
     92
     93
     94#
     95# Win32 rules
     96#
     97
     98# This is here in case we forget to make clean after a Windows build
     99CLEANFILES += $(PROGRAMS:%$(EXEEXT)=%.exe) \
     100              $(noinst_PROGRAMS:%$(EXEEXT)=%.exe)
     101
     102
     103#
    60104# Additional rules
    61105#
  • trunk/configure.ac

    r1980 r1981  
    119119  dnl  Disable this warning, it's too verbose with vector.h
    120120  CXXFLAGS="${CXXFLAGS} -Wno-sign-compare"
    121   AC_PATH_PROG(MAKE_FSELF, make_fself, no)],
     121  AC_PATH_PROG(MAKE_FSELF, make_fself, no)
     122  if test "${MAKE_FSELF}" = "no"; then
     123    AC_MSG_ERROR([[Building for PS3 but make_fself not found]])
     124  fi],
    122125 [MAKE_FSELF=no])
    123 AM_CONDITIONAL(USE_MAKE_FSELF, test "${MAKE_FSELF}" != "no")
    124126AM_CONDITIONAL(USE_PS3, test "${ac_cv_my_have_ps3}" != "no")
    125127
  • trunk/test/Makefile.am

    r1938 r1981  
    88bench: benchsuite$(EXEEXT)
    99        ./benchsuite$(EXEEXT)
    10 
    11 all-local: $(PROGRAMS) $(noinst_PROGRAMS)
    12         for x in $(^:%$(EXEEXT)=%); do \
    13           test x$(MAKE_FSELF) = xno || make_fself $${x}$(EXEEXT) $${x}.self; \
    14         done
    15 
    16 CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
    17              $(noinst_PROGRAMS:%$(EXEEXT)=%.elf) \
    18              $(noinst_PROGRAMS:%$(EXEEXT)=%.exe)
    1910
    2011EXTRA_DIST = data/gradient.png
  • trunk/test/math/Makefile.am

    r1923 r1981  
    44AM_CPPFLAGS = -I$(top_srcdir)/src
    55
    6 all-local: $(PROGRAMS) $(noinst_PROGRAMS)
    7         for x in $(^:%$(EXEEXT)=%); do \
    8           test x$(MAKE_FSELF) = xno || make_fself $${x}$(EXEEXT) $${x}.self; \
    9         done
    10 
    116EXTRA_DIST = NEWS.txt lolremez.sln remez.vcxproj remez.vcxproj.filters
    12 
    13 CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
    14              $(noinst_PROGRAMS:%$(EXEEXT)=%.elf) \
    15              $(noinst_PROGRAMS:%$(EXEEXT)=%.exe)
    167
    178noinst_PROGRAMS = pi poly remez
  • trunk/test/sandbox/Makefile.am

    r1923 r1981  
    33
    44AM_CPPFLAGS = -I$(top_srcdir)/src
    5 
    6 all-local: $(noinst_PROGRAMS)
    7         test x$(MAKE_FSELF) = xno || make_fself sample$(EXEEXT) sample.self
    8 
    9 CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
    10              $(noinst_PROGRAMS:%$(EXEEXT)=%.elf) \
    11              $(noinst_PROGRAMS:%$(EXEEXT)=%.exe)
    125
    136noinst_PROGRAMS = sample
  • trunk/test/xolotl/Makefile.am

    r1923 r1981  
    33
    44AM_CPPFLAGS = -I$(top_srcdir)/src
    5 
    6 all-local: $(noinst_PROGRAMS)
    7         test x$(MAKE_FSELF) = xno || make_fself xolotl$(EXEEXT) xolotl.self
    8 
    9 CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
    10              $(noinst_PROGRAMS:%$(EXEEXT)=%.elf) \
    11              $(noinst_PROGRAMS:%$(EXEEXT)=%.exe)
    125
    136noinst_PROGRAMS = xolotl
  • trunk/tools/neercs/Makefile.am

    r1971 r1981  
    2626                 @LOL_LIBS@ @PIPI_LIBS@ @CACA_LIBS@ @UTIL_LIBS@ @PAM_LIBS@
    2727neercs_DEPENDENCIES = $(top_builddir)/src/liblol.a
    28 
    29 if BUILD_NEERCS
    30 all-local: neercs$(EXEEXT)
    31         test $(MAKE_FSELF) = no || make_fself neercs$(EXEEXT) neercs.self
    32 endif
    33 
    34 CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
    35              $(noinst_PROGRAMS:%$(EXEEXT)=%.elf) \
    36              $(noinst_PROGRAMS:%$(EXEEXT)=%.exe)
    3728
    3829old_sources = \
  • trunk/tutorial/Makefile.am

    r1924 r1981  
    33
    44AM_CPPFLAGS = -I$(top_srcdir)/src
    5 
    6 all-local: $(PROGRAMS) $(noinst_PROGRAMS)
    7         for x in $(^:%$(EXEEXT)=%); do \
    8           test x$(MAKE_FSELF) = xno || make_fself $${x}$(EXEEXT) $${x}.self; \
    9         done
    10 
    11 CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
    12              $(noinst_PROGRAMS:%$(EXEEXT)=%.elf) \
    13              $(noinst_PROGRAMS:%$(EXEEXT)=%.exe)
    145
    156noinst_PROGRAMS = 01_triangle 02_cube 03_noise 05_easymesh 08_fbo 11_fractal
Note: See TracChangeset for help on using the changeset viewer.