Browse Source

ps3: refactor elf → self build logic and make make_fself mandatory

when building for the PS3 on a Unix system.
legacy
Sam Hocevar sam 12 years ago
parent
commit
50ff3f9ce0
7 changed files with 52 additions and 47 deletions
  1. +48
    -4
      build/autotools/common.am
  2. +4
    -2
      configure.ac
  3. +0
    -9
      test/Makefile.am
  4. +0
    -9
      test/math/Makefile.am
  5. +0
    -7
      test/sandbox/Makefile.am
  6. +0
    -7
      test/xolotl/Makefile.am
  7. +0
    -9
      tutorial/Makefile.am

+ 48
- 4
build/autotools/common.am View File

@@ -1,9 +1,20 @@

#
# Define these variables from the beginning
#

CLEANFILES =
SUFFIXES =


#
# Miscellaneous rules
#

lol_recursive_rule = \
@if test -n "$(SUBDIRS)"; then for subdir in $(SUBDIRS); do \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $(patsubst %-recursive, %, $@)) || exit 1; \
done; \
fi
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $(patsubst %-recursive, %, $@)) || exit 1; \
done; fi

bench: bench-recursive
bench-recursive:
@@ -46,7 +57,7 @@ lolfx_gen = $(lolfx_gen_$(V))
lolfx_gen_ = $(lolfx_gen_$(AM_DEFAULT_VERBOSITY))
lolfx_gen_0 = @echo " LOLFX " $@;

SUFFIXES = .lolfx
SUFFIXES += .lolfx
.lolfx.o:
$(lolfx_gen)
$(AM_V_at)(echo "char const *"; \
@@ -56,6 +67,39 @@ SUFFIXES = .lolfx
| $(CXXCOMPILE) -xc++ -c - -o $@


#
# PS3 fself support rules
#

fself_gen = $(fself_gen_$(V))
fself_gen_ = $(fself_gen_$(AM_DEFAULT_VERBOSITY))
fself_gen_0 = echo " FSELF " $${x}.self;
fself_gen_1 = echo make_fself $${x}$(EXEEXT) $${x}.self;

all-local: all-local-ps3
all-local-ps3: $(PROGRAMS) $(noinst_PROGRAMS)
@if test -n "$^"; then for x in $(^:%$(EXEEXT)=%); do \
if test x$(MAKE_FSELF) != xno; then \
$(fself_gen) \
make_fself $${x}$(EXEEXT) $${x}.self; \
fi; \
done; fi

CLEANFILES += $(PROGRAMS:%$(EXEEXT)=%.self) \
$(PROGRAMS:%$(EXEEXT)=%.elf) \
$(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
$(noinst_PROGRAMS:%$(EXEEXT)=%.elf)


#
# Win32 rules
#

# This is here in case we forget to make clean after a Windows build
CLEANFILES += $(PROGRAMS:%$(EXEEXT)=%.exe) \
$(noinst_PROGRAMS:%$(EXEEXT)=%.exe)


#
# Additional rules
#


+ 4
- 2
configure.ac View File

@@ -118,9 +118,11 @@ AC_CHECK_LIB(sysmodule_stub, cellSysmoduleLoadModule,
LOL_LIBS="${LOL_LIBS} -lio_stub -lusbd_stub -lpadfilter"
dnl Disable this warning, it's too verbose with vector.h
CXXFLAGS="${CXXFLAGS} -Wno-sign-compare"
AC_PATH_PROG(MAKE_FSELF, make_fself, no)],
AC_PATH_PROG(MAKE_FSELF, make_fself, no)
if test "${MAKE_FSELF}" = "no"; then
AC_MSG_ERROR([[Building for PS3 but make_fself not found]])
fi],
[MAKE_FSELF=no])
AM_CONDITIONAL(USE_MAKE_FSELF, test "${MAKE_FSELF}" != "no")
AM_CONDITIONAL(USE_PS3, test "${ac_cv_my_have_ps3}" != "no")




+ 0
- 9
test/Makefile.am View File

@@ -8,15 +8,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/src
bench: benchsuite$(EXEEXT)
./benchsuite$(EXEEXT)

all-local: $(PROGRAMS) $(noinst_PROGRAMS)
for x in $(^:%$(EXEEXT)=%); do \
test x$(MAKE_FSELF) = xno || make_fself $${x}$(EXEEXT) $${x}.self; \
done

CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
$(noinst_PROGRAMS:%$(EXEEXT)=%.elf) \
$(noinst_PROGRAMS:%$(EXEEXT)=%.exe)

EXTRA_DIST = data/gradient.png

noinst_PROGRAMS = benchsuite $(testsuite) btphystest


+ 0
- 9
test/math/Makefile.am View File

@@ -3,17 +3,8 @@ include $(top_srcdir)/build/autotools/common.am

AM_CPPFLAGS = -I$(top_srcdir)/src

all-local: $(PROGRAMS) $(noinst_PROGRAMS)
for x in $(^:%$(EXEEXT)=%); do \
test x$(MAKE_FSELF) = xno || make_fself $${x}$(EXEEXT) $${x}.self; \
done

EXTRA_DIST = NEWS.txt lolremez.sln remez.vcxproj remez.vcxproj.filters

CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
$(noinst_PROGRAMS:%$(EXEEXT)=%.elf) \
$(noinst_PROGRAMS:%$(EXEEXT)=%.exe)

noinst_PROGRAMS = pi poly remez

pi_SOURCES = pi.cpp


+ 0
- 7
test/sandbox/Makefile.am View File

@@ -3,13 +3,6 @@ include $(top_srcdir)/build/autotools/common.am

AM_CPPFLAGS = -I$(top_srcdir)/src

all-local: $(noinst_PROGRAMS)
test x$(MAKE_FSELF) = xno || make_fself sample$(EXEEXT) sample.self

CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
$(noinst_PROGRAMS:%$(EXEEXT)=%.elf) \
$(noinst_PROGRAMS:%$(EXEEXT)=%.exe)

noinst_PROGRAMS = sample

sample_SOURCES = sample.cpp


+ 0
- 7
test/xolotl/Makefile.am View File

@@ -3,13 +3,6 @@ include $(top_srcdir)/build/autotools/common.am

AM_CPPFLAGS = -I$(top_srcdir)/src

all-local: $(noinst_PROGRAMS)
test x$(MAKE_FSELF) = xno || make_fself xolotl$(EXEEXT) xolotl.self

CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
$(noinst_PROGRAMS:%$(EXEEXT)=%.elf) \
$(noinst_PROGRAMS:%$(EXEEXT)=%.exe)

noinst_PROGRAMS = xolotl

xolotl_SOURCES = xolotl.cpp xolotl.h


+ 0
- 9
tutorial/Makefile.am View File

@@ -3,15 +3,6 @@ include $(top_srcdir)/build/autotools/common.am

AM_CPPFLAGS = -I$(top_srcdir)/src

all-local: $(PROGRAMS) $(noinst_PROGRAMS)
for x in $(^:%$(EXEEXT)=%); do \
test x$(MAKE_FSELF) = xno || make_fself $${x}$(EXEEXT) $${x}.self; \
done

CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
$(noinst_PROGRAMS:%$(EXEEXT)=%.elf) \
$(noinst_PROGRAMS:%$(EXEEXT)=%.exe)

noinst_PROGRAMS = 01_triangle 02_cube 03_noise 05_easymesh 08_fbo 11_fractal

01_triangle_SOURCES = 01_triangle.cpp 01_triangle.lolfx


Loading…
Cancel
Save