Added version resource script.
[reactos.git] / reactos / lib / ole32 / makefile
1 # $Id: makefile,v 1.4 2001/07/21 15:40:04 ea Exp $
2 #
3 # ReactOS 0.17
4 # Jurgen Van Gael [jurgen.vangael@student.kuleuven.ac.be]
5 #
6 # Makefile for ReactOS ole32.dll
7 #
8 PATH_TO_TOP = ../..
9
10 CFLAGS = -fno-rtti -I$(PATH_TO_TOP)/include/
11
12 TARGETNAME=ole32
13
14 DLLTARGET=$(TARGETNAME).dll
15
16
17 OBJECTS=\
18 DllMain.o \
19 CoXxx.o \
20 Moniker.o \
21 Ole2.o \
22 OleAuto.o \
23 Misc.o \
24 Storage.o \
25 $(TARGETNAME).coff
26
27
28 CLEAN_FILES = *.o \
29 $(TARGETNAME).o $(TARGETNAME).a junk.tmp base.tmp temp.exp \
30 $(TARGETNAME).dll $(TARGETNAME).sym $(TARGETNAME).coff
31
32 all: $(DLLTARGET)
33
34 $(TARGETNAME).coff: $(TARGETNAME).rc $(PATH_TO_TOP)/include/reactos/resource.h
35
36 $(TARGETNAME).a: $(OBJECTS)
37 $(LD) -r $(OBJECTS) -o $(TARGETNAME).a
38
39 $(TARGETNAME).dll: $(DLLMAIN) $(OBJECTS) $(TARGETNAME).def
40 $(LD) -r $(OBJECTS) -o $(TARGETNAME).o
41 $(DLLTOOL) \
42 --dllname $(TARGETNAME).dll \
43 --def $(TARGETNAME).def \
44 --kill-at \
45 --output-lib $(TARGETNAME).a
46 $(CC) \
47 $(TARGETNAME).o \
48 ../kernel32/kernel32.a \
49 -nostartfiles \
50 -nostdlib \
51 -mdll \
52 -o junk.tmp \
53 -Wl,--entry=_DllMain@12\
54 -Wl,--base-file,base.tmp
55 - $(RM) junk.tmp
56 $(DLLTOOL) \
57 --dllname $(TARGETNAME).dll \
58 --base-file base.tmp \
59 --output-exp temp.exp \
60 --def $(TARGETNAME).def
61 - $(RM) base.tmp
62 $(CC) \
63 $(TARGETNAME).o \
64 ../kernel32/kernel32.a \
65 -nostartfiles \
66 -nostdlib \
67 -mdll \
68 -o $(TARGETNAME).dll \
69 -Wl,--entry=_DllMain@12\
70 -Wl,--image-base,0x77A50000 \
71 -Wl,--file-alignment,0x1000 \
72 -Wl,--section-alignment,0x1000 \
73 -Wl,temp.exp
74 - $(RM) temp.exp
75 $(NM) --numeric-sort $(TARGETNAME).dll > $(TARGETNAME).sym
76
77
78 clean:
79 - $(RM) $(CLEAN_FILES)
80
81 .PHONY: clean
82
83 include $(PATH_TO_TOP)/rules.mak