-# $Id: makefile,v 1.13 2000/08/05 18:01:54 dwelch Exp $
+# $Id: makefile,v 1.24 2001/07/25 06:20:01 ekohl Exp $
#
#
+PATH_TO_TOP = ../../..
+
TARGET=ide
-OBJECTS = $(TARGET).o $(TARGET).coff ../../../ntoskrnl/ntoskrnl.a
+OBJECTS = $(TARGET).o $(TARGET).coff
+
+LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
-BASE_CFLAGS = -I. -I../../../include
+CFLAGS = -D__NTDRIVER__ -I. -g
-all: $(TARGET).nostrip.sys $(TARGET).sys
+all: $(TARGET).sys.unstripped $(TARGET).sys
.phony: all
clean:
- - $(RM) $(TARGET).o
- - $(RM) $(TARGET).coff
- - $(RM) junk.tmp
- - $(RM) base.tmp
- - $(RM) temp.exp
- - $(RM) $(TARGET).sys
- - $(RM) $(TARGET).nostrip.sys
+ - $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
.phony: clean
-floppy: $(FLOPPY_DIR)/drivers/$(TARGET).sys
+install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-ifeq ($(DOSCLI),yes)
- $(CP) $(TARGET).sys $(FLOPPY_DIR)\drivers\$(TARGET).sys
-else
$(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
-endif
-
-dist: ../../../$(DIST_DIR)/drivers/$(TARGET).sys
-
-../../../$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
-ifeq ($(DOSCLI),yes)
- $(CP) $(TARGET).sys ..\..\..\$(DIST_DIR)\drivers\$(TARGET).sys
-else
- $(CP) $(TARGET).sys ../../../$(DIST_DIR)/drivers/$(TARGET).sys
-endif
-$(TARGET).sys: $(OBJECTS)
- $(STRIP) --strip-debug $(OBJECTS)
- $(CC) \
- -specs=../../svc_specs \
- -mdll \
- -o junk.tmp \
- -Wl,--defsym,_end=end \
- -Wl,--defsym,_edata=__data_end__ \
- -Wl,--defsym,_etext=etext \
- -Wl,--base-file,base.tmp $(OBJECTS)
- - $(RM) junk.tmp
- $(DLLTOOL) \
- --dllname $(TARGET).sys \
- --base-file base.tmp \
- --output-exp temp.exp \
- --kill-at
- - $(RM) base.tmp
- $(CC) \
- --verbose \
- -Wl,--image-base,0x10000 \
- -Wl,-e,_DriverEntry@8 \
- -Wl,temp.exp \
- -specs=../../svc_specs \
- -mdll \
- -o $(TARGET).sys \
- $(OBJECTS)
- - $(RM) temp.exp
+dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
-$(TARGET).nostrip.sys: $(OBJECTS)
- $(CC) \
- -specs=../../svc_specs \
- -mdll \
- -o junk.tmp \
- -Wl,--defsym,_end=end \
- -Wl,--defsym,_edata=__data_end__ \
- -Wl,--defsym,_etext=etext \
- -Wl,--base-file,base.tmp $(OBJECTS)
- - $(RM) junk.tmp
- $(DLLTOOL) \
- --dllname $(TARGET).sys \
- --base-file base.tmp \
- --output-exp temp.exp \
- --kill-at
- - $(RM) base.tmp
- $(CC) \
- --verbose \
- -Wl,--image-base,0x10000 \
- -Wl,-e,_DriverEntry@8 \
- -Wl,temp.exp \
- -specs=../../svc_specs \
- -mdll \
- -o $(TARGET).nostrip.sys \
- $(OBJECTS)
- - $(RM) temp.exp
+$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
+ $(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
+$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
WITH_DEBUGGING=yes
-include ../../../rules.mak
+WARNINGS_ARE_ERRORS = yes
+include $(PATH_TO_TOP)/rules.mak