Correct Wii makefile and fix clean rule

This commit is contained in:
simon.kagstrom 2009-05-09 08:54:52 +00:00
parent db1b3ae0e5
commit fc58a6f6f8
2 changed files with 7 additions and 3 deletions

View File

@ -38,7 +38,7 @@ all: uae-host.elf
# How to delete the intermediate files. # How to delete the intermediate files.
clean: clean:
@echo Cleaning $(OBJ_DIR) @echo Cleaning $(OBJ_DIR)
@rm -f $(OBJS) @rm -f $(OBJS) src/machdep
$(OBJ_DIR): $(OBJ_DIR):
install -d $@ install -d $@

View File

@ -43,7 +43,7 @@ all: uae.dol
# How to delete the intermediate files. # How to delete the intermediate files.
clean: clean:
@echo Cleaning $(OBJ_DIR) @echo Cleaning $(OBJ_DIR)
@rm -f $(OBJS) @rm -f $(OBJS) src/machdep
$(OBJ_DIR): $(OBJ_DIR):
install -d $@ install -d $@
@ -51,6 +51,10 @@ $(OBJ_DIR):
src/sysconfig.h: src/sysconfig.h.wii src/sysconfig.h: src/sysconfig.h.wii
cp $< $@ cp $< $@
src/machdep:
rm -f $@
cd src && ln -s md-ppc-gcc machdep
%.h: %.h.wii %.h: %.h.wii
cp $< $@ cp $< $@
@ -84,7 +88,7 @@ CFLAGS := $(COMMON_FLAGS) $(INCLUDES) $(DEFINES)
LDFLAGS := $(COMMON_FLAGS) -L$(LIB_DIR) -L$(DEVKITPRO)/libogc/lib/wii -lz -lSDL_ttf -lSDL -lfreetype -lfat -lwiiuse -lbte -logc -lm LDFLAGS := $(COMMON_FLAGS) -L$(LIB_DIR) -L$(DEVKITPRO)/libogc/lib/wii -lz -lSDL_ttf -lSDL -lfreetype -lfat -lwiiuse -lbte -logc -lm
# How to link an ELF. # How to link an ELF.
uae.elf: src/sysconfig.h $(OBJS) uae.elf: src/machdep src/sysconfig.h $(OBJS)
@echo Linking $@ @echo Linking $@
@-mkdir -p $(dir $@) @-mkdir -p $(dir $@)
powerpc-gekko-g++ -o $@ $(OBJS) $(LDFLAGS) powerpc-gekko-g++ -o $@ $(OBJS) $(LDFLAGS)