2007-09-17 21:12:29 +00:00
|
|
|
include ../../config.mak
|
|
|
|
|
|
|
|
all: dhasetup.exe dhahelper.sys
|
|
|
|
|
|
|
|
dhasetup.exe: dhasetup.c
|
2007-09-18 10:23:16 +00:00
|
|
|
$(CC) -o $@ $<
|
2007-09-17 21:12:29 +00:00
|
|
|
|
|
|
|
dhahelper.o: dhahelper.c dhahelper.h
|
2007-09-18 10:23:16 +00:00
|
|
|
$(CC) -Wall -Os -c $< -o $@
|
2007-09-17 21:12:29 +00:00
|
|
|
|
|
|
|
dhahelper-rc.o: dhahelper.rc common.ver ntverp.h
|
2007-12-28 10:33:22 +00:00
|
|
|
$(WINDRES) -I. $< $@
|
2007-09-17 21:12:29 +00:00
|
|
|
|
|
|
|
base.tmp: dhahelper.o dhahelper-rc.o
|
2007-09-18 10:23:16 +00:00
|
|
|
$(CC) -Wl,--base-file,$@ \
|
2007-09-17 21:12:29 +00:00
|
|
|
-Wl,--entry,_DriverEntry@8 \
|
|
|
|
-nostartfiles -nostdlib \
|
2007-09-18 10:23:16 +00:00
|
|
|
-o junk.tmp $^ -lntoskrnl
|
2007-09-17 21:12:29 +00:00
|
|
|
-rm -f junk.tmp
|
|
|
|
|
|
|
|
temp.exp: base.tmp
|
2007-09-18 10:23:16 +00:00
|
|
|
dlltool --dllname dhahelper.sys --base-file $< --output-exp $@
|
2007-09-17 21:12:29 +00:00
|
|
|
|
2007-09-18 10:23:16 +00:00
|
|
|
dhahelper.sys: temp.exp dhahelper.o dhahelper-rc.o
|
2007-09-17 21:12:29 +00:00
|
|
|
$(CC) -Wl,--subsystem,native \
|
|
|
|
-Wl,--image-base,0x10000 \
|
|
|
|
-Wl,--file-alignment,0x1000 \
|
|
|
|
-Wl,--section-alignment,0x1000 \
|
|
|
|
-Wl,--entry,_DriverEntry@8 \
|
2007-09-18 10:23:16 +00:00
|
|
|
-Wl,$< \
|
2007-09-17 21:12:29 +00:00
|
|
|
-mdll -nostartfiles -nostdlib \
|
2007-09-18 10:23:16 +00:00
|
|
|
-o $@ dhahelper.o dhahelper-rc.o \
|
2007-09-17 21:12:29 +00:00
|
|
|
-lntoskrnl
|
2007-09-18 10:23:16 +00:00
|
|
|
strip $@
|
2007-09-17 21:12:29 +00:00
|
|
|
|
2008-04-26 11:17:17 +00:00
|
|
|
clean distclean:
|
2007-09-17 21:12:29 +00:00
|
|
|
rm -f *.o *~ dhahelper.sys dhasetup.exe base.tmp temp.exp
|
|
|
|
|
2007-09-18 10:23:34 +00:00
|
|
|
.PHONY: all clean distclean
|