--- colinux-20040131/src/colinux/os/winnt/build/Makefile 2004-01-31 18:57:08.000000000 +0200 +++ colinux-20040204/src/colinux/os/winnt/build/Makefile 2004-02-05 00:11:27.000000000 +0200 @@ -21,47 +21,30 @@ DRIVER_TARGET := $(BUILD_PATH)/linux.sys -WINDIR=$(WINUSER)@$(WINBOX):$(WINREMOTEDIR) -WINBOX_SCP=scp -i ~/.ssh/locallan -WINBOX_SSH=ssh -X -l $(WINUSER) -i ~/.ssh/locallan $(WINBOX) -WINLINK=$(WINBOX_SSH) /cygdrive/c/NTDDK/bin/link.exe - -WINLINK_FLAGS= \ - /machine:ix86 \ - /STACK:262144,4096 \ - /MERGE:_PAGE=PAGE \ - /MERGE:_TEXT=.text \ - /SECTION:INIT,d \ - /OPT:REF \ - /OPT:ICF \ - /IGNORE:4001,4037,4039,4044,4065,4070,4078,4087,4089,4198 \ - /INCREMENTAL:NO \ - /FULLBUILD \ - /FORCE:MULTIPLE \ - /NOCOMMENT \ - /release \ - /NODEFAULTLIB \ - /debug:FULL \ - /debugtype:cv \ - /version:5.00 \ - /osversion:5.00 \ - /optidata \ - /driver \ - /align:0x1000 \ - /filealign:0x1000 \ - /subsystem:native,5.00 \ - /base:0x10000 \ - /entry:DriverEntry@8 \ - -WINLINK_LIBS= \ - C:\\\\NTDDK\\\\libfre\\\\i386\\\\ntoskrnl.lib \ - C:\\\\NTDDK\\\\libfre\\\\i386\\\\hal.lib \ - C:\\\\NTDDK\\\\libfre\\\\i386\\\\wmilib.lib \ - -$(DRIVER_TARGET): $(BUILD_PATH)/driver.o - $(WINBOX_SCP) $^ $(WINDIR) - $(WINLINK) /out:$(notdir $@) $(WINLINK_FLAGS) $(notdir $^) $(WINLINK_LIBS) - $(WINBOX_SCP) $(WINDIR)$(notdir $@) $@ +CLEAN_FILES += $(BUILD_PATH)/driver.base.tmp +$(BUILD_PATH)/driver.base.tmp: $(BUILD_PATH)/driver.o + i686-pc-cygwin-gcc -Wl,--base-file,$@ \ + -Wl,--entry,_DriverEntry@8 \ + -nostartfiles -nostdlib \ + -o junk.tmp $^ -lntoskrnl -lhal + rm -f junk.tmp + +CLEAN_FILES += $(BUILD_PATH)/driver.base.exp +$(BUILD_PATH)/driver.base.exp: $(BUILD_PATH)/driver.base.tmp + i686-pc-cygwin-dlltool --dllname linux.sys \ + --base-file $^ \ + --output-exp $@ + +$(DRIVER_TARGET): $(BUILD_PATH)/driver.o $(BUILD_PATH)/driver.base.exp + i686-pc-cygwin-gcc \ + -Wl,--subsystem,native \ + -Wl,--image-base,0x10000 \ + -Wl,--file-alignment,0x1000 \ + -Wl,--section-alignment,0x1000 \ + -Wl,--entry,_DriverEntry@8 \ + -Wl,$(word 2,$^) \ + -mdll -nostartfiles -nostdlib \ + -o $@ $(word 1,$^) -lntoskrnl -lhal LOCAL_TARGET += $(DRIVER_TARGET) LOCAL_FILES = \ @@ -74,16 +57,7 @@ colinux: $(LOCAL_FILES) -parts: $(LOCAL_FILES) - -upload: $(LOCAL_FILES) - $(WINBOX_SCP) $^ $(WINDIR) - -upload_console: $(BUILD_ROOT)/colinux/os/current/user/console/colinux-console.exe - $(WINBOX_SCP) $^ $(WINDIR) - driver: $(BUILD_PATH)/driver.o - CLEAN_FILES := $(CLEAN_FILES) \ $(LOCAL_TARGETS)