e00f2f1329e34d082829565dec5a17931a23feaf
[reactos.git] / reactos / lib / user32 / makefile_rex
1 # $Id: makefile_rex,v 1.4 1999/06/14 07:37:52 rex Exp $
2 #
3 # ReactOS Operating System
4 #
5 # Makefile for user32.dll
6 #
7 include ../../rules.mak
8
9 TARGET=user32
10
11 ifneq ($(HOST),mingw32-windows)
12 ifneq ($(HOST),mingw32-linux)
13 DLLTARGET=$(TARGET).a
14 else
15 DLLTARGET=$(TARGET).dll
16 endif
17 else
18 DLLTARGET=$(TARGET).dll
19 endif
20
21 all: $(DLLTARGET)
22
23
24 MISC_OBJECTS = misc/sprintf.o misc/exitwin.o misc/dllmain.o #misc/string.o
25
26 #RESOURCE_OBJECT = $(TARGET).coff
27
28 WINDOWS_OBJECTS = windows/message.o windows/wndproc.o windows/win.o windows/hook.o windows/spy.o\
29 #windows/queue.o
30
31 OBJECTS = $(MISC_OBJECTS) $(WINDOWS_OBJECTS)
32
33 ifeq ($(DOSCLI),yes)
34 CLEAN_FILES = misc\*.o \
35 $(TARGET).o $(TARGET).a junk.tmp base.tmp temp.exp $(TARGET).dll $(TARGET).sym
36 else
37 CLEAN_FILES = misc/*.o \
38 $(TARGET).o $(TARGET).a junk.tmp base.tmp temp.exp $(TARGET).dll $(TARGET).sym
39 endif
40
41 $(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
42 $(RC) $(TARGET).rc $(TARGET).coff
43
44 $(TARGET).a: $(OBJECTS)
45 $(AR) csr $(TARGET).a $(OBJECTS)
46
47 $(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
48 $(LD) -r $(OBJECTS) -o $(TARGET).o
49 $(DLLTOOL) \
50 --dllname $(TARGET).dll \
51 --def $(TARGET).def \
52 --output-lib $(TARGET).a \
53 --add-stdcall-alias \
54 --kill-at
55 $(CC) $(TARGET).o \
56 ../ntdll/ntdll.a \
57 ../kernel32/kernel32.a \
58 -specs=$(TARGET)_specs \
59 -mdll \
60 -o junk.tmp \
61 -Wl,--base-file,base.tmp
62 - $(RM) junk.tmp
63 $(DLLTOOL) \
64 --dllname $(TARGET).dll \
65 --base-file base.tmp \
66 --output-exp temp.exp \
67 --def $(TARGET).def \
68 --add-stdcall-alias \
69 --kill-at
70 - $(RM) base.tmp
71 $(CC) $(TARGET).o \
72 ../ntdll/ntdll.a\
73 ../kernel32/kernel32.a \
74 -specs=$(TARGET)_specs \
75 -mdll \
76 -o $(TARGET).dll \
77 -Wl,--image-base,0x70000000 \
78 -Wl,--file-alignment,0x1000 \
79 -Wl,--section-alignment,0x1000 \
80 -Wl,temp.exp
81 - $(RM) temp.exp
82 $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
83
84 clean: $(CLEAN_FILES:%=%_clean)
85
86 $(CLEAN_FILES:%=%_clean): %_clean:
87 - $(RM) $*
88
89 .PHONY: clean $(CLEAN_FILES:%=%_clean)
90
91 # EOF