Fixed ne2000 driver so it will link correctly.
authorCasper Hornstrup <chorns@users.sourceforge.net>
Wed, 4 Jul 2001 21:24:02 +0000 (21:24 +0000)
committerCasper Hornstrup <chorns@users.sourceforge.net>
Wed, 4 Jul 2001 21:24:02 +0000 (21:24 +0000)
svn path=/trunk/; revision=2037

reactos/drivers/net/dd/ne2000/.cvsignore
reactos/drivers/net/dd/ne2000/Makefile
reactos/drivers/net/dd/ne2000/ne2000.edf [new file with mode: 0644]

index 9237ac3..51ffd22 100644 (file)
@@ -1,2 +1,4 @@
+base.tmp
+junk.tmp
 ne2000.coff
-objects
+temp.exp
\ No newline at end of file
index d9e9725..5540599 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.8 2001/06/22 12:28:52 ekohl Exp $
+# $Id: Makefile,v 1.9 2001/07/04 21:24:02 chorns Exp $
 #
 #
 PATH_TO_TOP = ../../../..
@@ -7,75 +7,70 @@ CFLAGS = -D__NTDRIVER__ -Iinclude
 
 TARGETNAME = ne2000
 
-OBJECTS = ne2000/main.o ne2000/8390.o $(TARGET).coff $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-
 RESOURCE_OBJECT  = $(TARGETNAME).coff
 NE2000_OBJECTS   = ne2000/main.o ne2000/8390.o $(RESOURCE_OBJECT)
-IMPORT_LIBS      = ../../ndis/ndis.a ../../../../ntoskrnl/ntoskrnl.a
-
-
-all: objects $(TARGETNAME).sys
-
-objects:
-       mkdir objects
+IMPORT_LIBS      = $(PATH_TO_TOP)/services/net/ndis/ndis.a \
+                   $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
 
-objects/ne2000.o: $(NE2000_OBJECTS)
-       $(LD) -r $(NE2000_OBJECTS) -o objects/ne2000.o
+OBJECTS = $(NE2000_OBJECTS) $(IMPORT_LIBS)
 
-OBJECTS = objects/ne2000.o
+all: $(TARGETNAME).sys
 
-$(TARGETNAME).coff: $(TARGETNAME).rc ../../../../include/reactos/resource.h
+$(TARGETNAME).coff: $(TARGETNAME).rc $(PATH_TO_TOP)/include/reactos/resource.h
 
 ifeq ($(DOSCLI),yes)
 CLEAN_FILES = \
-               *.o ne2000\*.o objects\*.o $(TARGETNAME).coff \
+           ne2000\*.o $(TARGETNAME).coff \
         $(TARGETNAME).a junk.tmp base.tmp temp.exp \
                $(TARGETNAME).sys $(TARGETNAME).sym
 else
 CLEAN_FILES = \
-               *.o ne2000\*.o objects/*.o $(TARGETNAME).coff \
+               ne2000/*.o $(TARGETNAME).coff \
         $(TARGETNAME).a junk.tmp base.tmp temp.exp \
                $(TARGETNAME).sys $(TARGETNAME).sym
 endif
 
-$(TARGETNAME).sys: $(OBJECTS) $(TARGETNAME).def
-       $(LD) -r $(OBJECTS) -o $(TARGETNAME).o
+$(TARGETNAME).sys: $(OBJECTS)
        $(DLLTOOL) \
                --dllname $(TARGETNAME).sys \
                --def $(TARGETNAME).def \
-               --output-lib $(TARGETNAME).a \
-               --kill-at
+               --kill-at \
+               --output-lib $(TARGETNAME).a
        $(CC) \
-               -nostdlib -nostdinc \
-               --subsystem=native \
-               -mdll \
-               --dll \
-               -e _DriverEntry@8 \
-               -o $(TARGETNAME).sys \
-               -Wl,--image-base,0x10000 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,--defsym,_end=end \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
-               -Wl,--base-file,base.tmp \
-               $(TARGETNAME).o \
-               $(IMPORT_LIBS)
-       - $(RM) base.tmp
-       $(NM) --numeric-sort $(TARGETNAME).sys > $(TARGETNAME).sym
-
-clean:
-       - $(RM) *.o
-       - $(RM) *.a
-       - $(RM) ne2000\*.o
-       - $(RM) objects\*.o
+        $(OBJECTS) \
+        -mdll \
+        -o junk.tmp \
+        -Wl,--image-base,0x10000 \
+        -Wl,--defsym,_end=end \
+           -Wl,--defsym,_edata=__data_end__ \
+        -Wl,--defsym,_etext=etext \
+           -Wl,--base-file,base.tmp
        - $(RM) junk.tmp
+       $(DLLTOOL) \
+        --dllname $(TARGETNAME).sys \
+        --base-file base.tmp \
+               --output-exp temp.exp \
+        --def $(TARGETNAME).edf
        - $(RM) base.tmp
+       $(CC) \
+        $(OBJECTS) \
+        -mdll \
+        -o $(TARGETNAME).sys \
+        -Wl,--image-base,0x10000 \
+        -Wl,-e,_DriverEntry@8 \
+        -Wl,--defsym,_end=end \
+           -Wl,--defsym,_edata=__data_end__ \
+        -Wl,--defsym,_etext=etext \
+        -Wl,temp.exp 
        - $(RM) temp.exp
-       - $(RM) $(TARGETNAME).coff
-       - $(RM) $(TARGETNAME).sym
-       - $(RM) $(TARGETNAME).sys
+       $(NM) --numeric-sort $(TARGETNAME).sys > $(TARGETNAME).sym
 
+clean: $(CLEAN_FILES:%=%_clean)
+
+$(CLEAN_FILES:%=%_clean): %_clean:
+       - $(RM) $*
+
+.PHONY: clean $(CLEAN_FILES:%=%_clean)
 .phony: clean
 
 install: $(FLOPPY_DIR)/drivers/$(TARGETNAME).sys
@@ -83,13 +78,12 @@ install: $(FLOPPY_DIR)/drivers/$(TARGETNAME).sys
 $(FLOPPY_DIR)/drivers/$(TARGETNAME).sys: $(TARGETNAME).sys
        $(CP) $(TARGETNAME).sys $(FLOPPY_DIR)/drivers/$(TARGETNAME).sys
 
-dist: ../../../$(DIST_DIR)/drivers/$(TARGETNAME).sys
+dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGETNAME).sys
 
-../../../$(DIST_DIR)/drivers/$(TARGETNAME).sys: $(TARGETNAME).sys
-       $(CP) $(TARGETNAME).sys ../../../../$(DIST_DIR)/drivers/$(TARGETNAME).sys
+$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGETNAME).sys: $(TARGETNAME).sys
+       $(CP) $(TARGETNAME).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGETNAME).sys
 
 $(TARGETNAME).sys: $(OBJECTS)
 
 WITH_DEBUGGING=yes
-include ../../../../rules.mak
-
+include $(PATH_TO_TOP)/rules.mak
diff --git a/reactos/drivers/net/dd/ne2000/ne2000.edf b/reactos/drivers/net/dd/ne2000/ne2000.edf
new file mode 100644 (file)
index 0000000..cb1da92
--- /dev/null
@@ -0,0 +1,7 @@
+; Novell Eagle 2000 driver - ReactOS Operating System
+
+LIBRARY NE2000.SYS
+
+EXPORTS
+
+; EOF