9199190205c2d810dac5d4c6e81588bc242501cb
[reactos.git] / reactos / lib / advapi32 / makefile
1 # $Id: makefile,v 1.9 1999/10/25 06:58:09 rex Exp $
2 #
3 # Makefile for ReactOS advapi32.dll
4 #
5
6 BASE_CFLAGS = -I../../include
7
8 TARGET=advapi32
9 ifneq ($(HOST),mingw32-windows)
10 ifneq ($(HOST),mingw32-linux)
11 DLLTARGET=$(TARGET).a
12 else
13 DLLTARGET=$(TARGET).dll
14 endif
15 else
16 DLLTARGET=$(TARGET).dll
17 endif
18
19
20 MISC_OBJECTS = misc/dllmain.o misc/shutdown.o \
21 misc/sysfunc.o
22
23 REGISTRY_OBJECTS = reg/reg.o
24
25 SECURITY_OBJECTS = sec/lsa.o sec/sec.o
26 #SECURITY_OBJECTS = sec/lsa.o sec/rtlsec.o sec/sec.o
27
28 SERVICE_OBJECTS = service/scm.o
29
30 TOKEN_OBJECTS = token/token.o
31
32 RESOURCE_OBJECT = advapi32.coff
33
34 OBJECTS = $(MISC_OBJECTS) $(REGISTRY_OBJECTS) $(SECURITY_OBJECTS) \
35 $(SERVICE_OBJECTS) $(TOKEN_OBJECTS) \
36 $(RESOURCE_OBJECT)
37
38 all: $(DLLTARGET)
39
40 $(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
41 $(RC) $(TARGET).rc $(TARGET).coff
42
43 $(TARGET).a: $(OBJECTS)
44 $(LD) -r $(OBJECTS) -o $(TARGET).a
45
46 $(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
47 $(LD) -r $(OBJECTS) -o $(TARGET).o
48 $(DLLTOOL) \
49 --dllname $(TARGET).dll \
50 --def $(TARGET).def \
51 --kill-at \
52 --output-lib $(TARGET).a
53 $(CC) \
54 $(TARGET).o \
55 ../ntdll/ntdll.a \
56 ../kernel32/kernel32.a \
57 -specs=$(TARGET)_specs \
58 -mdll \
59 -o junk.tmp \
60 -Wl,--base-file,base.tmp
61 - $(RM) junk.tmp
62 $(DLLTOOL) \
63 --dllname $(TARGET).dll \
64 --base-file base.tmp \
65 --output-exp temp.exp \
66 --def $(TARGET).edf
67 - $(RM) base.tmp
68 $(CC) \
69 $(TARGET).o \
70 ../ntdll/ntdll.a \
71 ../kernel32/kernel32.a \
72 -specs=$(TARGET)_specs \
73 -mdll \
74 -o $(TARGET).dll \
75 -Wl,--image-base,0x20000000 \
76 -Wl,--file-alignment,0x1000 \
77 -Wl,--section-alignment,0x1000 \
78 -Wl,temp.exp
79 - $(RM) temp.exp
80 $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
81
82
83 clean:
84
85 include ../../rules.mak
86