[build] Move driver loader into subdir
authorShao Miller <Shao.Miller@yrdsb.edu.on.ca>
Fri, 30 Apr 2010 21:16:05 +0000 (17:16 -0400)
committerShao Miller <Shao.Miller@yrdsb.edu.on.ca>
Fri, 30 Apr 2010 21:16:05 +0000 (17:16 -0400)
Makefile
makeutils.bat
src/loader/loader.c [moved from src/loader.c with 98% similarity]

index 642736c..cf9892b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -38,15 +38,15 @@ bin/winvblk.inf bin/txtsetup.oem: makeinf.bat Makefile
        touch bin/winvblk.inf
        touch bin/txtsetup.oem
 
-src/obj/loader32.o: src/loader.c src/portable.h Makefile
-       @mkdir -p src/obj
-       @rm -rf src/obj/loader32.o bin/loader32.exe bin/loader64.exe
-       gcc $(INCLUDES) -c -Wall src/loader.c -o src/obj/loader32.o
+src/loader/obj/loader32.o: src/loader/loader.c src/portable.h Makefile
+       @mkdir -p src/loader/obj
+       @rm -rf src/loader/obj/loader32.o bin/loader32.exe bin/loader64.exe
+       gcc $(INCLUDES) -c -Wall src/loader/loader.c -o src/loader/obj/loader32.o
 
-bin/loader32.exe: src/obj/loader32.o Makefile
+bin/loader32.exe: src/loader/obj/loader32.o Makefile
        @mkdir -p bin
        @rm -rf bin/loader32.exe bin/loader64.exe
-       gcc $(INCLUDES) -Wall src/obj/loader32.o -o bin/loader32.exe -lsetupapi
+       gcc $(INCLUDES) -Wall src/loader/obj/loader32.o -o bin/loader32.exe -lsetupapi
        strip bin/loader32.exe
 
 src/obj/mount.o: src/mount.c src/portable.h src/mount.h Makefile
index 541e86f..3f2ba61 100644 (file)
@@ -6,12 +6,18 @@ pushd .
 call %ddkdir%\bin\setenv.bat %ddkdir% w2k\r
 popd\r
 cl /I%CRT_INC_PATH% /DWIN32_LEAN_AND_MEAN mount.c /Fe..\bin\winvblk.exe /link /LIBPATH:%DDK_LIB_DEST%\i386 /LIBPATH:%Lib%\crt\i386 bufferoverflowU.lib\r
-del mount.obj\r
-cl /I%CRT_INC_PATH% /DWIN32_LEAN_AND_MEAN loader.c /Fe..\bin\loader32.exe /link /LIBPATH:%DDK_LIB_DEST%\i386 /LIBPATH:%Lib%\crt\i386 setupapi.lib bufferoverflowU.lib\r
+del mount.obj
+pushd .
+cd loader\r
+cl /I%CRT_INC_PATH% /DWIN32_LEAN_AND_MEAN loader.c /Fe..\..\bin\loader32.exe /link /LIBPATH:%DDK_LIB_DEST%\i386 /LIBPATH:%Lib%\crt\i386 setupapi.lib bufferoverflowU.lib
 del loader.obj\r
+popd\r
 pushd .\r
 call %ddkdir%\bin\setenv.bat %ddkdir% wnet amd64\r
 popd\r
-cl /I%CRT_INC_PATH% /DWIN32_LEAN_AND_MEAN loader.c /Fe..\bin\loader64.exe /link /LIBPATH:%DDK_LIB_DEST%\%_BUILDARCH% /LIBPATH:%Lib%\crt\%_BUILDARCH% setupapi.lib bufferoverflowU.lib\r
-del loader.obj\r
+pushd .
+cd loader
+cl /I%CRT_INC_PATH% /DWIN32_LEAN_AND_MEAN loader.c /Fe..\..\bin\loader64.exe /link /LIBPATH:%DDK_LIB_DEST%\%_BUILDARCH% /LIBPATH:%Lib%\crt\%_BUILDARCH% setupapi.lib bufferoverflowU.lib\r
+del loader.obj
+popd\r
 cd ..\r
similarity index 98%
rename from src/loader.c
rename to src/loader/loader.c
index aa5e05b..2be4571 100644 (file)
@@ -31,8 +31,8 @@
 #include <Setupapi.h>
 #include <newdev.h>
 
-#include "winvblock.h"
-#include "portable.h"
+#include "../winvblock.h"
+#include "../portable.h"
 
 #define MAX_CLASS_NAME_LEN 64