1#! make -f 2#---------------------------------------------------------------------------- 3 4 5SRCS = simple.c 6 7TARGET_BIN = simple.elf 8 9 10#---------------------------------------------------------------------------- 11# NW4R commondefs 12# 13 14include $(NW4R_ROOT)/Library/build/buildtools/commondefs 15 16 17#---------------------------------------------------------------------------- 18# Attach the RevoEX library 19# 20 21SRCTREE_REVOEX_ROOT := $(subst \,/,$(REVOLUTION_EXT_ROOT)) 22REVO_EX_LIB_DIR := $(SRCTREE_REVOEX_ROOT)/RVL/lib 23REVO_EX_LIBS := $(notdir $(wildcard $(REVO_EX_LIB_DIR)/*$(SDK_SUFFIX).a)) 24# If library files were obtained with *.a, *D.a files are also included, so get rid of them 25ifneq ($(SDK_SUFFIX),D) 26REVO_EX_LIBS := $(patsubst %D.a,%.a,$(REVO_EX_LIBS)) 27endif 28 29# The RVL-SDK has some of the same include files; handle them as a local library and make them visible before the RVL-SDK 30# 31LLIBRARY_DIRS += $(REVO_EX_LIB_DIR) 32LLIBRARIES += $(REVO_EX_LIBS) 33LINCLUDES += $(SRCTREE_REVOEX_ROOT)/include 34 35 36#---------------------------------------------------------------------------- 37# Target of make 38# 39 40do-build: $(TARGETS) 41 $(MAKE) export 42 43 44#---------------------------------------------------------------------------- 45# Convert ELF file to DOL file and copy to the location for creating WAD file 46# 47 48export: 49 $(MKDIRP) ../bin 50 makedol -f $(BINDIR)/$(TARGET_BIN) -d $(TARGET_BIN:.elf=.dol) 51 $(MV) $(TARGET_BIN:.elf=.dol) ../bin 52 53 54#---------------------------------------------------------------------------- 55# NW4R modulerules 56# 57 58include $(NW4R_ROOT)/Library/build/buildtools/modulerules 59 60 61#===== End of Makefile ===== 62