move work on clean rule
[reactos.git] / reactos / lib / user32 / makefile_rex
1 # $Id: makefile_rex,v 1.19 2001/07/15 21:18:56 rex Exp $
2 #
3 # ReactOS Operating System
4 #
5 # Makefile for user32.dll
6 #
7 PATH_TO_TOP = ../..
8
9 CFLAGS = -I./include -DUNICODE -DDBG
10
11 TARGET=user32
12
13 MISC_OBJECTS = \
14 misc/desktop.o \
15 misc/dllmain.o \
16 misc/sprintf.o \
17 misc/stubs.o \
18 misc/win32k.o \
19 misc/winsta.o \
20 misc/resources.o
21
22 WINDOWS_OBJECTS = \
23 windows/class.o \
24 windows/message.o \
25 windows/window.o
26
27 RESOURCE_OBJECT = $(TARGET).coff
28
29 OBJECTS = $(MISC_OBJECTS) $(WINDOWS_OBJECTS) \
30 $(RESOURCE_OBJECT)
31
32 LIBS = ../ntdll/ntdll.a \
33 ../kernel32/kernel32.a \
34 ../gdi32/gdi32.a
35
36 CLEAN_FILES = misc/*.o windows/*.o internal/*.o controls/*.o graphics/*.o resources/*.o \
37 $(TARGET).o $(TARGET).a junk.tmp base.tmp temp.exp $(TARGET).dll $(TARGET).sym
38
39 all: $(TARGET).dll
40
41 $(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
42
43 $(TARGET).a: $(OBJECTS)
44 $(LD) -r $(OBJECTS) -o $(TARGETNAME).a
45
46 $(TARGET).dll: $(LIBS) $(OBJECTS) $(TARGET).def
47 $(LD) -r $(OBJECTS) -o $(TARGET).o
48 $(DLLTOOL) \
49 --dllname $(TARGET).dll \
50 --def $(TARGET).def \
51 --output-lib $(TARGET).a \
52 --kill-at
53 $(CC) $(TARGET).o \
54 $(LIBS) \
55 -e _DllMain@12 \
56 -specs=$(TARGET)_specs \
57 -mdll \
58 -o junk.tmp \
59 -Wl,--base-file,base.tmp
60 - $(RM) junk.tmp
61 $(DLLTOOL) \
62 --dllname $(TARGET).dll \
63 --base-file base.tmp \
64 --output-exp temp.exp \
65 --def $(TARGET).edf
66 - $(RM) base.tmp
67 $(CC) $(TARGET).o \
68 $(LIBS) \
69 -o $(TARGET).dll \
70 -specs=$(TARGET)_specs \
71 -mdll \
72 -e _DllMain@12 \
73 -Wl,--image-base,0x77e70000 \
74 -Wl,--file-alignment,0x1000 \
75 -Wl,--section-alignment,0x1000 \
76 -Wl,temp.exp
77 - $(RM) temp.exp
78 $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
79
80 clean:
81 - $(RM) $(CLEAN_FILES)
82
83 .PHONY: clean
84
85 install: $(FLOPPY_DIR)/dlls/$(TARGET).dll
86
87 $(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
88 $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
89
90 dist: $(DIST_DIR)/dlls/$(TARGET).dll
91
92 $(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
93 $(CP) $(TARGET).dll ../../$(DIST_DIR)/dlls/$(TARGET).dll
94
95 include ../../rules.mak
96
97 # EOF