From bfba598e38372c4d3296fb6c9f45bfca5fa825cc Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Fri, 1 Jan 2016 17:30:49 -0700 Subject: [PATCH] Add extract-xiso to tools. --- .gitignore | 9 +++++++++ .gitmodules | 3 +++ Makefile | 28 ++++++++++++++++++---------- README.md | 5 ++++- tools/extract-xiso | 1 + 5 files changed, 35 insertions(+), 11 deletions(-) create mode 100644 .gitmodules create mode 160000 tools/extract-xiso diff --git a/.gitignore b/.gitignore index aa41c94..400f1e1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,12 @@ _*.cpp _*.h + +app/main.exe.manifest +app/ps.fp +app/vs.vp +bin/ +default.iso +tools/cxbe/cxbe +tools/fp20compiler/fp20compiler +tools/vp20compiler/vp20compiler diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..081579d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "tools/extract-xiso"] + path = tools/extract-xiso + url = https://github.com/mborgerson/extract-xiso.git diff --git a/Makefile b/Makefile index 0e9a7c1..51c3abd 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,11 @@ -LLDLINK = /usr/local/opt/llvm/bin/lld -flavor link -CC = /usr/local/opt/llvm/bin/clang -CXX = /usr/local/opt/llvm/bin/clang++ - -CGC = wine tools/cg/cgc.exe - -CXBE = tools/cxbe/cxbe +LLDLINK = /usr/local/opt/llvm/bin/lld -flavor link +CC = /usr/local/opt/llvm/bin/clang +CXX = /usr/local/opt/llvm/bin/clang++ +CGC = wine tools/cg/cgc.exe +CXBE = tools/cxbe/cxbe VP20COMPILER = tools/vp20compiler/vp20compiler FP20COMPILER = tools/fp20compiler/fp20compiler - +EXTRACT_XISO = tools/extract-xiso/extract-xiso CFLAGS = -target i386-pc-win32 -march=pentium3 \ -ffreestanding -nostdlib -fno-builtin -fno-exceptions \ @@ -56,6 +54,11 @@ SRCS := $(wildcard xboxrt/*.c) \ $(USB_SRCS) OBJS = $(SRCS:.c=.obj) +all: default.iso + +default.iso: bin/default.xbe + $(EXTRACT_XISO) -c bin $@ + bin/default.xbe: app/main.exe mkdir -p bin $(CXBE) -OUT:bin/default.xbe -TITLE:0ldskoo1 app/main.exe @@ -87,6 +90,11 @@ vp20compiler: fp20compiler: $(MAKE) -C tools/fp20compiler -.PHONY: clean cxbe vp20compiler fp20compiler +extract-xiso: + $(MAKE) -C tools/extract-xiso + +tools: cxbe vp20compiler fp20compiler extract-xiso + +.PHONY: clean tools cxbe vp20compiler fp20compiler extract-xiso clean: - rm -f bin/default.xbe app/main.exe $(OBJS) $(SHADERINT) $(SHADEROBJ) + rm -f default.iso bin/default.xbe app/main.exe $(OBJS) $(SHADERINT) $(SHADEROBJ) diff --git a/README.md b/README.md index d1c3a46..75c9ee7 100644 --- a/README.md +++ b/README.md @@ -29,10 +29,13 @@ You need: On OSX with [Homebrew](http://brew.sh/), this might do the job (XCode ships with make and bison and flex): - brew install wine llvm --with-lld + brew install wine llvm --with-lld --with-clang Now you can compile your application and nxdk: + git submodule init + git submodule update + make tools make Credits diff --git a/tools/extract-xiso b/tools/extract-xiso new file mode 160000 index 0000000..4c3045a --- /dev/null +++ b/tools/extract-xiso @@ -0,0 +1 @@ +Subproject commit 4c3045a43b02d1896e32aaff414aae04a4ffcfb9