c01fbba62061d9dd7c4ef15e9f2ef122de334357
[reactos.git] / reactos / lib / oleaut32 / makefile
1 # $Id: makefile,v 1.1 2001/07/16 01:45:43 rex Exp $
2 #
3 # Makefile for ReactOS oleaut32.dll
4 #
5 PATH_TO_TOP = ../..
6
7 BASE_CFLAGS = -I../../include
8
9 TARGETNAME=oleaut32
10
11 IMAGE_BASE = 0x76260000
12
13 DLLTARGET=$(TARGETNAME).dll
14 OBJECTS = dllmain.o stubs.o
15 CLEAN_FILES = $(OBJECTS) $(TARGETNAME).o $(TARGETNAME).a junk.tmp \
16 base.tmp temp.exp $(TARGETNAME).dll $(TARGETNAME).sym \
17 $(TARGETNAME).coff
18
19 all: $(DLLTARGET)
20
21 $(TARGETNAME).coff: $(TARGETNAME).rc ../../include/reactos/resource.h
22
23 $(TARGETNAME).a: $(OBJECTS)
24 $(LD) -r $(OBJECTS) -o $(TARGETNAME).a
25
26 $(TARGETNAME).dll: $(OBJECTS) $(TARGETNAME).def
27 $(LD) -r $(OBJECTS) -o $(TARGETNAME).o
28 $(DLLTOOL) \
29 --dllname $(TARGETNAME).dll \
30 --def $(TARGETNAME).def \
31 --kill-at \
32 --output-lib $(TARGETNAME).a
33 $(CC) \
34 $(TARGETNAME).o \
35 ../ntdll/ntdll.a \
36 ../kernel32/kernel32.a \
37 -nostartfiles \
38 -nostdlib \
39 -mdll \
40 -o junk.tmp \
41 -Wl,--entry=_DllMain@12\
42 -Wl,--base-file,base.tmp
43 - $(RM) junk.tmp
44 $(DLLTOOL) \
45 --dllname $(TARGETNAME).dll \
46 --base-file base.tmp \
47 --output-exp temp.exp \
48 --def $(TARGETNAME).def
49 - $(RM) base.tmp
50 $(CC) \
51 $(TARGETNAME).o \
52 ../ntdll/ntdll.a \
53 ../kernel32/kernel32.a \
54 -nostartfiles \
55 -nostdlib \
56 -mdll \
57 -o $(TARGETNAME).dll \
58 -Wl,--entry=_DllMain@12\
59 -Wl,--image-base,$(IMAGE_BASE) \
60 -Wl,--file-alignment,0x1000 \
61 -Wl,--section-alignment,0x1000 \
62 -Wl,temp.exp
63 - $(RM) temp.exp
64 $(NM) --numeric-sort $(TARGETNAME).dll > $(TARGETNAME).sym
65
66
67 clean:
68 - $(RM) $(CLEAN_FILES)
69
70 .PHONY: clean
71
72 install: $(FLOPPY_DIR)/dlls/$(TARGETNAME).dll
73
74 $(FLOPPY_DIR)/dlls/$(TARGETNAME).dll: $(TARGETNAME).dll
75 $(CP) $(TARGETNAME).dll $(FLOPPY_DIR)/dlls/$(TARGETNAME).dll
76
77
78 dist: $(DIST_DIR)/dlls/$(TARGETNAME).dll
79
80 $(DIST_DIR)/dlls/$(TARGETNAME).dll: $(TARGETNAME).dll
81 $(CP) $(TARGETNAME).dll ../../$(DIST_DIR)/dlls/$(TARGETNAME).dll
82
83
84 include ../../rules.mak
85