Major update of the build system:
[reactos.git] / reactos / lib / user32 / makefile_rex
index 85e7cb3..4f901f2 100644 (file)
@@ -1,14 +1,24 @@
-# $Id: makefile_rex,v 1.19 2001/07/15 21:18:56 rex Exp $
-#
-# ReactOS Operating System
-#
-# Makefile for user32.dll
-#
+# $Id: makefile_rex,v 1.20 2001/08/21 20:13:07 chorns Exp $
+
 PATH_TO_TOP = ../..
 
-CFLAGS = -I./include -DUNICODE -DDBG
+TARGET_TYPE = dynlink
+
+TARGET_NAME = user32
+
+TARGET_BASE = 0x77e70000
+
+TARGET_SDKLIBS = ntdll.a kernel32.a gdi32.a
+
+TARGET_CFLAGS = -I./include -DUNICODE -DDBG
+
+TARGET_OBJECTS = $(TARGET_NAME).o
 
-TARGET=user32
+TARGET_CLEAN = misc/*.o windows/*.o
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
 
 MISC_OBJECTS = \
   misc/desktop.o  \
@@ -24,74 +34,11 @@ WINDOWS_OBJECTS = \
        windows/message.o  \
        windows/window.o
 
-RESOURCE_OBJECT = $(TARGET).coff
-
-OBJECTS = $(MISC_OBJECTS) $(WINDOWS_OBJECTS) \
-          $(RESOURCE_OBJECT)
-
-LIBS = ../ntdll/ntdll.a \
-       ../kernel32/kernel32.a \
-       ../gdi32/gdi32.a
-
-CLEAN_FILES = misc/*.o windows/*.o internal/*.o controls/*.o graphics/*.o resources/*.o \
-              $(TARGET).o $(TARGET).a junk.tmp base.tmp temp.exp $(TARGET).dll $(TARGET).sym
-
-all: $(TARGET).dll
-
-$(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
-
-$(TARGET).a: $(OBJECTS)
-       $(LD) -r $(OBJECTS) -o $(TARGETNAME).a
-
-$(TARGET).dll: $(LIBS) $(OBJECTS) $(TARGET).def
-       $(LD) -r $(OBJECTS) -o $(TARGET).o
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --def $(TARGET).def \
-               --output-lib $(TARGET).a \
-               --kill-at
-       $(CC) $(TARGET).o \
-         $(LIBS) \
-         -e _DllMain@12 \
-               -specs=$(TARGET)_specs \
-               -mdll \
-               -o junk.tmp \
-               -Wl,--base-file,base.tmp 
-       - $(RM) junk.tmp
-       $(DLLTOOL) \
-               --dllname $(TARGET).dll \
-               --base-file base.tmp \
-    --output-exp temp.exp \
-               --def $(TARGET).edf
-       - $(RM) base.tmp
-       $(CC) $(TARGET).o \
-         $(LIBS) \
-               -o $(TARGET).dll \
-               -specs=$(TARGET)_specs \
-               -mdll \
-               -e _DllMain@12 \
-               -Wl,--image-base,0x77e70000 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,temp.exp
-       - $(RM) temp.exp
-       $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
-
-clean: 
-       - $(RM) $(CLEAN_FILES)
-
-.PHONY: clean 
-
-install: $(FLOPPY_DIR)/dlls/$(TARGET).dll
-
-$(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
-
-dist: $(DIST_DIR)/dlls/$(TARGET).dll
-
-$(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
-       $(CP) $(TARGET).dll ../../$(DIST_DIR)/dlls/$(TARGET).dll
+OBJECTS = \
+  $(MISC_OBJECTS) \
+  $(WINDOWS_OBJECTS)
 
-include ../../rules.mak
+$(TARGET_NAME).o: $(OBJECTS)
+       $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o
 
 # EOF