:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / lib / rpcrt4 / Makefile
1 # $Id$
2 #
3 # ReactOS Operating System
4 #
5 PATH_TO_TOP = ../..
6
7 TARGET = midl rpcrt4 rpcss
8
9 BASE_CFLAGS = -I../../include
10
11 CFLAGS = $(CFLAGS) 
12
13 midl:
14         
15 DLLTARGET=$(TARGET).dll
16
17
18 all: $(DLLTARGET)
19
20 SYNCH_OBJECTS = synch/critical.o synch/event.o synch/wait.o synch/intrlck.o synch/timer.o
21
22 MISC_OBJECTS = misc/error.o misc/atom.o misc/handle.o misc/env.o misc/dllmain.o \
23                 misc/console.o misc/time.o misc/stubs.o misc/rtl.o misc/ldr.o misc/res.o
24
25 FILE_OBJECTS = file/file.o file/curdir.o file/lfile.o file/dir.o \
26                file/iocompl.o file/volume.o file/deviceio.o file/dosdev.o \
27                file/create.o file/find.o file/copy.o file/pipe.o \
28                file/move.o file/lock.o file/rw.o file/delete.o
29
30 MEM_OBJECTS = mem/virtual.o mem/heap.o mem/utils.o mem/section.o mem/isbad.o mem/procmem.o
31
32 NLS_OBJECTS =  nls/codepage.o nls/cpmisc.o nls/cptable.o\
33  nls/cp37.o nls/cp437.o nls/cp500.o nls/cp737.o nls/cp775.o nls/cp850.o nls/cp852.o nls/cp855.o nls/cp857.o\
34  nls/cp860.o nls/cp861.o nls/cp863.o nls/cp865.o nls/cp866.o nls/cp869.o nls/cp875.o nls/cp1026.o\
35  nls/cp1250.o nls/cp1251.o nls/cp1252.o nls/cp1253.o nls/cp1254.o nls/cp1255.o nls/cp1256.o nls/cp1257.o\
36  nls/cp10000.o nls/cp10006.o nls/cp10007.o nls/cp10029.o nls/cp10079.o nls/cp10081.o\
37  nls/lctable.o\
38  nls/lcAFK.o nls/lcBEL.o nls/lcBGR.o nls/lcCAT.o nls/lcCSY.o nls/lcDAN.o\
39  nls/lcDEA.o nls/lcDEC.o nls/lcDEL.o nls/lcDES.o nls/lcDEU.o\
40  nls/lcELL.o\
41  nls/lcENA.o nls/lcENB.o nls/lcENC.o nls/lcENG.o nls/lcENI.o nls/lcENJ.o nls/lcENL.o nls/lcENS.o nls/lcENT.o\
42  nls/lcENU.o nls/lcENZ.o\
43  nls/lcESA.o nls/lcESB.o nls/lcESC.o nls/lcESD.o nls/lcESE.o nls/lcESF.o nls/lcESG.o nls/lcESH.o nls/lcESI.o\
44  nls/lcESL.o nls/lcESM.o nls/lcESN.o nls/lcESO.o nls/lcESP.o nls/lcESR.o nls/lcESS.o nls/lcESU.o nls/lcESV.o\
45  nls/lcESY.o nls/lcESZ.o\
46  nls/lcETI.o nls/lcEUQ.o nls/lcFIN.o nls/lcFOS.o\
47  nls/lcFRA.o nls/lcFRB.o nls/lcFRC.o nls/lcFRL.o nls/lcFRS.o\
48  nls/lcHRV.o nls/lcHUN.o nls/lcIND.o nls/lcISL.o nls/lcITA.o nls/lcITS.o nls/lcLTH.o nls/lcLVI.o nls/lcNLB.o\
49  nls/lcNLD.o nls/lcNON.o nls/lcNOR.o nls/lcPLK.o nls/lcPTB.o nls/lcPTG.o nls/lcROM.o nls/lcRUS.o nls/lcSKY.o\
50  nls/lcSLV.o nls/lcSQI.o nls/lcSRB.o nls/lcSRL.o nls/lcSVE.o nls/lcSVF.o nls/lcTRK.o nls/lcUKR.o\
51  nls/locale.o nls/mbtowc.o nls/wctomb.o nls/ole2nls.o
52
53 THREAD_OBJECTS = thread/thread.o thread/tls.o
54
55 PROCESS_OBJECTS = process/proc.o process/cmdline.o process/create.o \
56                   process/lib.o
57
58 STRING_OBJECTS = string/lstring.o
59
60 INTERNAL_OBJECTS = internal/dprintf.o
61
62 EXCEPT_OBJECTS = except/except.o
63
64 RESOURCE_OBJECT = $(TARGET).coff
65
66
67 OBJECTS = $(MISC_OBJECTS) $(FILE_OBJECTS) $(THREAD_OBJECTS) \
68           $(PROCESS_OBJECTS) $(STRING_OBJECTS) $(MEM_OBJECTS) \
69           $(INTERNAL_OBJECTS) $(SYNCH_OBJECTS) $(EXCEPT_OBJECTS) \
70           $(RESOURCE_OBJECT)
71
72 CLEAN_FILES = except/*.o file/*.o internal/*.o mem/*.o misc/*.o nls/*.o  \
73               process/*.o string/*.o synch/*.o thread/*.o  \
74               $(TARGET).o $(TARGET).a junk.tmp base.tmp temp.exp \
75               $(TARGET).dll $(TARGET).sym $(TARGET).coff
76
77 nls/ole2nls.o: nls/ole2nls.c
78         $(CC) $(CFLAGS) -I. nls/ole2nls.c
79
80 $(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
81
82 $(TARGET).a: $(OBJECTS)
83         $(AR) csr $(TARGET).a $(OBJECTS)
84
85 $(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
86         $(LD) \
87                 -r $(OBJECTS) \
88                 -o $(TARGET).o
89         $(DLLTOOL) \
90                 --dllname $(TARGET).dll \
91                 --def $(TARGET).def \
92                 --kill-at \
93                 --output-lib $(TARGET).a
94         $(CC) \
95                 -specs=k32_specs \
96                 -mdll \
97                 -o junk.tmp \
98                 -Wl,--base-file,base.tmp \
99                 $(TARGET).o \
100                 ../ntdll/ntdll.a
101         - $(RM) junk.tmp
102         $(DLLTOOL) \
103                 --dllname $(TARGET).dll \
104                 --base-file base.tmp \
105                 --output-exp temp.exp \
106                 --def $(TARGET).edf
107         - $(RM) base.tmp
108         $(CC) \
109                 -specs=k32_specs \
110                 -mdll \
111                 -o $(TARGET).dll \
112                 $(TARGET).o \
113                 ../ntdll/ntdll.a \
114                 -Wl,--image-base,$(KERNEL32_BASE) \
115                 -Wl,--file-alignment,0x1000 \
116                 -Wl,--section-alignment,0x1000 \
117                 -Wl,temp.exp
118         - $(RM) temp.exp
119         $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
120
121 clean: 
122         - $(RM) $(CLEAN_FILES)
123
124 .PHONY: clean 
125
126 install: $(FLOPPY_DIR)/dlls/$(TARGET).dll
127
128 $(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
129         $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
130
131 dist: $(DIST_DIR)/dlls/$(TARGET).dll
132
133 $(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
134         $(CP) $(TARGET).dll ../../$(DIST_DIR)/dlls/$(TARGET).dll
135
136 WARNINGS_ARE_ERRORS = yes
137 include ../../rules.mak