dslinux/toolchain/ndstool .cvsignore Makefile changelog ndstool.prj

stsp stsp at user.in-berlin.de
Sun Aug 13 22:25:31 CEST 2006


Update of /cvsroot/dslinux/dslinux/toolchain/ndstool
In directory antilope:/tmp/cvs-serv5897

Added Files:
	.cvsignore Makefile changelog ndstool.prj 
Log Message:
Adding pristine copy of ndstool so I can branch from it.


--- NEW FILE: .cvsignore ---
build
ndstool.exe
--- NEW FILE: ndstool.prj ---
[Project ID]
Signature=UE Proj: v.1
[Group]
0=
1=
2=
[Project Information]
Filter=*.*
Use Relative Directory=1
Relative to Project File=1
Project Wordfile=
Project Tagfile=
Create Tagfile=0
Include Sub Directories=0
Project Directory=C:\projects\devkitPro\buildscripts\tools\nds\ndstool\

[Open Files]
Open File0=E:\projects\devkitPro\buildscripts\tools\nds\ndstool\source\header.cpp
Open File Pos0=16832
Open File Line0=18697
Open File Window Pos0=0,1,-1,-1,-4,-23,0,0,757,475
Open File1=E:\projects\devkitPro\buildscripts\tools\nds\ndstool\changelog
Open File Pos1=0
Open File Line1=0
Active File Index=1
Open File Window Pos1=2,3,-1,-1,-4,-23,22,22,783,501
Open File2=E:\devkitPro_test\devkitARM\arm-elf\include\math.h
Active File Display Mode=3

Open File Pos2=1569
Open File Line2=1255
Open File Window Pos2=0,1,-1,-1,-4,-23,44,44,805,523
Open File3=E:\projects\devkitPro\buildscripts\tools\nds\ndstool\data\arm7_sha1_homebrew.bin
Open File Pos3=0
Open File Line3=0
Open File Window Pos3=0,1,-1,-1,-4,-23,66,66,827,545
Open File4=E:\web\adsense_clicklogger.php
Open File Pos4=647
Open File Line4=0
Open File Window Pos4=0,1,-1,-1,-4,-23,88,88,849,567
Open File5=E:\web\adsense_clicklogger.js
Open File Pos5=468
Open File Line5=0
Open File Window Pos5=0,1,-1,-1,-4,-23,110,110,871,589
Open File6=\\Fairlight\www\gamecube\menu.html
Open File Pos6=5471
Open File Line6=5471
Open File Window Pos6=0,1,-1,-1,-4,-23,132,132,893,611
Open File7=
[File View]
Current Select=Project Files\changelog
Scroll Position=0
[Files]
0=changelog
1=DefaultArm7\source\
2=include\
3=source\
4=DefaultArm7\Makefile
5=Makefile

--- NEW FILE: Makefile ---
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------

#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files
#---------------------------------------------------------------------------------
TARGET		:=	ndstool
BUILD			:=	build
SOURCES		:=	source
INCLUDES	:=	include
DATA			:=	data

export PATH		:=	$(DEVKITARM)/bin:$(PATH)
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
DEBUGFLAGS	:=


UNAME := $(shell uname -s)

CFLAGS	:=	$(DEBUGFLAGS) -Wall -O3
CFLAGS	+=	$(INCLUDE)


LDFLAGS	=	$(DEBUGFLAGS)

ifneq (,$(findstring Darwin,$(UNAME)))
        LDFLAGS         +=
endif



ifneq (,$(findstring MINGW,$(UNAME)))
	PLATFORM	:= win32
	EXEEXT		:= .exe
	CFLAGS		+= -mno-cygwin
	LDFLAGS		+= -mno-cygwin -Wl,--strip-debug
endif

ifneq (,$(findstring CYGWIN,$(UNAME)))
	CFLAGS		+= -mno-cygwin
	LDFLAGS		+= -mno-cygwin -Wl,--strip-debug
	EXEEXT		:= .exe
endif

ifneq (,$(findstring Linux,$(UNAME)))
	LDFLAGS 	+= -static -Wl,--strip-debug
endif

CXXFLAGS	=	$(CFLAGS) -fno-rtti -fno-exceptions

#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
#---------------------------------------------------------------------------------
LIBS	:= -lelf

#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS	:= /usr/local /c/cygwin/usr/local

#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------

export OUTPUTDIR:=	$(CURDIR)
export OUTPUT	:=	$(CURDIR)/$(TARGET)

export VPATH	:=	$(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
			$(foreach dir,$(DATA),$(CURDIR)/$(dir)) \
			$(CURDIR)/DefaultArm7 $(CURDIR)/Loader

export CC	:=	$(PREFIX)gcc
export CXX	:=	$(PREFIX)g++
export AR	:=	$(PREFIX)ar
export OBJCOPY	:=	$(PREFIX)objcopy

#---------------------------------------------------------------------------------
# automatically build a list of object files for our project
#---------------------------------------------------------------------------------
CFILES		:=	$(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES	:=	$(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
SFILES		:=	$(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
BINFILES	:=	default_arm7.bin loadme.bin $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.bin)))
BMPFILES	:=	$(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.bmp)))

export OFILES	:= $(BINFILES:.bin=.o) $(BMPFILES:.bmp=.o)  $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
ifeq ($(strip $(CPPFILES)),)
#---------------------------------------------------------------------------------
	export LD	:=	$(CC)
#---------------------------------------------------------------------------------
else
#---------------------------------------------------------------------------------
	export LD	:=	$(CXX)
#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------

export INCLUDE	:=	$(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
			$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
			-I$(CURDIR)/$(BUILD)

export LIBPATHS	:=	$(foreach dir,$(LIBDIRS),-L$(dir)/lib)

.PHONY: $(BUILD) clean

#---------------------------------------------------------------------------------
$(BUILD):
	@echo $(PATH)
	@[ -d $@ ] || mkdir -p $@
	@make PassMeIncludes
	@make -C DefaultArm7
	@make -C Loader
	@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
	@./ndstool -@ DefaultArm7/default_arm7.bin && echo For official devkitPro releases, add this SHA1 hash of default ARM7 binary to data/arm7_sha1_homebrew.bin and recompile. || echo -n

#---------------------------------------------------------------------------------
.PHONY: PassMeIncludes
PassMeIncludes: $(BUILD)/passme_vhd1.h $(BUILD)/passme_vhd2.h

$(BUILD)/passme_vhd1.h: $(SOURCES)/passme.vhd
	cat $< | gawk '/^--!/ { COND=1; $$0=""; } // { gsub("\"", "\\\""); gsub("\011", "\\t"); gsub("\015", ""); if (!COND) print "\"" $$0 "\\n\"" }' > $@

$(BUILD)/passme_vhd2.h: $(SOURCES)/passme.vhd
	cat $< | gawk '/^--!/ { COND=1; $$0=""; } // { gsub("\"", "\\\""); gsub("\011", "\\t"); gsub("\015", ""); if (COND) print "\"" $$0 "\\n\"" }' > $@

#---------------------------------------------------------------------------------
clean:
	@echo clean ...
	@make -C DefaultArm7 clean
	@make -C Loader clean
	@rm -fr $(BUILD) $(OUTPUT)

#---------------------------------------------------------------------------------
all: clean $(BUILD)

#---------------------------------------------------------------------------------
run: $(OUTPUT)
	@echo $(OUTPUT)

install:
	cp  $(OUTPUT)$(EXEEXT) $(PREFIX)

#---------------------------------------------------------------------------------
else

DEPENDS	:=	$(OFILES:.o=.d)

#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
$(OUTPUT): $(OFILES)
	@echo linking
	@$(LD) $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $(OUTPUT)$(EXEEXT)
	-@( cd $(OUTPUTDIR); upx -q -9 $(TARGET)$(EXEEXT) )

#---------------------------------------------------------------------------------
# Compile Targets for C/C++
#---------------------------------------------------------------------------------

#---------------------------------------------------------------------------------
%.o : %.cpp
	@echo $(notdir $<)
	@$(CXX) -MMD $(CXXFLAGS) -o $@ -c $<

#---------------------------------------------------------------------------------
%.o : %.c
	@echo $(notdir $<)
	@$(CC) -MMD $(CFLAGS) -o $@ -c $<

#---------------------------------------------------------------------------------
%.o : %.s
	@echo $(notdir $<)
	@$(CC) -MMD $(ASFLAGS) -o $@ -c $<


#---------------------------------------------------------------------------------
%.c	:	%.bmp
#---------------------------------------------------------------------------------
	@echo $(notdir $<)
	@raw2c $<
 
#---------------------------------------------------------------------------------
%.c	:	%.bin
#---------------------------------------------------------------------------------
	@echo $(notdir $<)
	@raw2c $<

-include $(DEPENDS)

#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------

--- NEW FILE: changelog ---
Nintendo DS rom tool
by Rafael Vuijk (aka DarkFader)

CVS admins / additional code:
	DarkFader <darkfader at xs4all.nl>
	natrium42 <natrium at gmail.com>
	WinterMute <wntrmute at gmail.com>

Update version in include/ndstool_version.h

v1.27 - ARM7 executable hooking feature
v1.26 - wildcards for extraction, changed options handling
v1.25 - info output fixes, dat file support
v1.24 - PassMe vhdl generator, default ARM7 hash checking
v1.23 - update default ARM7 for latest libnds
	add time to version & date reporting
	use cpufastset swi for loader
v1.22 - fixed sound core in default ARM7
v1.21 - added signature check, CRC32
v1.20 - fixed filesystem stuff, added overlay support
v1.19 - some banner information
v1.18 - default logo is now a PassMe NDS loader
v1.17 - BMP converter for logo
v1.16 - added options to set maker code and game code
v1.15 - 4bpp support for banner icon, logo
v1.14 - banner version & CRC
v1.13 - option for unique ID
v1.12 - extra entry point option
v1.11 - default arm7 binary internal again
v1.10 - padding, added filesize and headersize, endianess fix for bmp loader, default arm7 binary external
v1.09 - added default arm7 binary
v1.08 - added icon converter
v1.07 - add/extract header option, filesystem
v1.06 - changed parameter style, add/extract icon+title data option
v1.05 - fix CRC option only updates header CRC for easier PassMe calculation
v1.04 - added option to list files without extracting
v1.03 - shows if secure area CRC was ok, added function to create NDS file (ELF files for ARM7/9, no filesystem yet)
v1.02 - added maker codes, logo CRC, cartridge code
v1.01 - extracts ARM7/ARM9 code, more header info
v1.00 - shows info, fixes CRC, extracts files




More information about the dslinux-commit mailing list