remove lib folder creation from top level make.

fix generation of TOPDIR in subdirectories.
This commit is contained in:
Dave Murphy 2007-12-21 09:30:15 +00:00
parent 64012781ef
commit b34e817e2f
3 changed files with 11 additions and 14 deletions

View File

@ -10,14 +10,11 @@ default: release
all: release dist all: release dist
lib: release:
@[ -d $@ ] || mkdir -p $@
release: lib
make -C nds BUILD=release make -C nds BUILD=release
make -C gba BUILD=release make -C gba BUILD=release
debug: lib debug:
make -C nds BUILD=debug make -C nds BUILD=debug
make -C gba BUILD=debug make -C gba BUILD=debug

View File

@ -7,7 +7,6 @@ endif
include $(DEVKITARM)/gba_rules include $(DEVKITARM)/gba_rules
TOPDIR ?= $(CURDIR)/..
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# BUILD is the directory where object files & intermediate files will be placed # BUILD is the directory where object files & intermediate files will be placed
@ -67,6 +66,7 @@ LIBDIRS := $(LIBGBA)
ifneq ($(BUILD),$(notdir $(CURDIR))) ifneq ($(BUILD),$(notdir $(CURDIR)))
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
export TOPDIR ?= $(CURDIR)/..
export DEPSDIR := $(CURDIR)/$(BUILD) export DEPSDIR := $(CURDIR)/$(BUILD)
@ -140,6 +140,9 @@ $(GBABIN) : $(OFILES) $(LIB)
@$(AR) rcs "$(GBABIN)" $(OFILES) @$(AR) rcs "$(GBABIN)" $(OFILES)
@echo built ... $(notdir $@) @echo built ... $(notdir $@)
$(LIB):
mkdir $(LIB)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# you need a rule like this for each extension you use as binary data # you need a rule like this for each extension you use as binary data
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
@ -155,5 +158,3 @@ $(GBABIN) : $(OFILES) $(LIB)
endif endif
#--------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------
$(LIB):
mkdir $(LIB)

View File

@ -7,8 +7,6 @@ endif
include $(DEVKITARM)/ds_rules include $(DEVKITARM)/ds_rules
TOPDIR ?= $(CURDIR)/..
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# BUILD is the directory where object files & intermediate files will be placed # BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code # SOURCES is a list of directories containing source code
@ -28,8 +26,6 @@ LIB := $(TOPDIR)/nds/lib
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
ARCH := -mthumb -mthumb-interwork ARCH := -mthumb -mthumb-interwork
# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD
# *insists* it has a FPU or VFP, and it won't take no for an answer!
CFLAGS := -g -Wall -O2\ CFLAGS := -g -Wall -O2\
-march=armv5te -mtune=arm946e-s -fomit-frame-pointer\ -march=armv5te -mtune=arm946e-s -fomit-frame-pointer\
-ffast-math \ -ffast-math \
@ -65,6 +61,8 @@ LIBDIRS := $(LIBNDS)
ifneq ($(BUILD),$(notdir $(CURDIR))) ifneq ($(BUILD),$(notdir $(CURDIR)))
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
export TOPDIR ?= $(CURDIR)/..
export DEPSDIR := $(CURDIR)/$(BUILD) export DEPSDIR := $(CURDIR)/$(BUILD)
@ -120,6 +118,9 @@ $(ARM9BIN) : $(OFILES) $(LIB)
@$(AR) rcs "$(ARM9BIN)" $(OFILES) @$(AR) rcs "$(ARM9BIN)" $(OFILES)
@echo built ... $(notdir $@) @echo built ... $(notdir $@)
$(LIB):
mkdir $(LIB)
-include $(DEPENDS) -include $(DEPENDS)
@ -127,5 +128,3 @@ $(ARM9BIN) : $(OFILES) $(LIB)
endif endif
#--------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------
$(LIB):
mkdir $(LIB)