ffd671808af93cabeee498694ca4497ae83ad05b
[reactos.git] / reactos / subsys / win32k / makefile
1 #
2 # WIN32K.SYS build spec
3 #
4
5 MAIN_OBJECTS = main/dllmain.o
6 MISC_OBJECTS = misc/driver.o
7 OBJECTS_OBJECTS = objects/bitmaps.o objects/brush.o objects/cliprgn.o \
8 objects/color.o objects/coord.o objects/dc.o \
9 objects/fillshap.o objects/icm.o objects/line.o \
10 objects/metafile.o objects/paint.o objects/path.o \
11 objects/pen.o objects/print.o objects/region.o \
12 objects/text.o objects/wingl.o
13 RESOURCE_OBJECT = win32k.coff
14 STUBS_OBJECTS = stubs/stubs.o
15
16 OBJECTS = $(MAIN_OBJECTS) $(MISC_OBJECTS) $(OBJECTS_OBJECTS) \
17 $(RESOURCE_OBJECT) $(STUBS_OBJECTS)
18
19 all: win32k.sys
20
21 win32k.coff: win32k.rc ../../include/reactos/resource.h
22 $(RC) win32k.rc win32k.coff
23
24 ifeq ($(DOSCLI),yes)
25 CLEAN_FILES = main\*.o misc\*.o stubs\*.o objects\*.o win32k.coff win32k.o \
26 win32k.a junk.tmp base.tmp temp.exp win32k.sys win32k.sym
27 else
28 CLEAN_FILES = main/*.o misc/*.o stubs/*.o objects/*.o win32k.coff win32k.o \
29 win32k.a junk.tmp base.tmp temp.exp win32k.sys win32k.sym
30 endif
31
32 win32k.sys: $(OBJECTS) win32k.def
33 $(LD) -r $(OBJECTS) -o win32k.o
34 $(DLLTOOL) --dllname win32k.sys --def win32k.def \
35 --output-lib win32k.a
36 $(CC) --subsystem=windows -mdll --dll -e _DllMain@12 -o junk.tmp \
37 -Wl,--image-base,0x0 \
38 -Wl,--file-alignment,0x1000 \
39 -Wl,--section-alignment,0x1000 \
40 -Wl,--defsym,_end=end \
41 -Wl,--defsym,_edata=__data_end__ \
42 -Wl,--defsym,_etext=etext -Wl,--base-file,base.tmp win32k.o \
43 ../../ntoskrnl/ntoskrnl.a
44 - $(RM) junk.tmp
45 $(DLLTOOL) --dllname win32k.sys --base-file base.tmp \
46 --output-exp temp.exp --def win32k.def
47 - $(RM) base.tmp
48 $(CC) --subsystem=windows -mdll --dll -e _DllMain@12 \
49 -o win32k.sys win32k.o ../../ntoskrnl/ntoskrnl.a \
50 -Wl,--image-base,0x0 \
51 -Wl,--file-alignment,0x1000 \
52 -Wl,--section-alignment,0x1000 \
53 -Wl,--defsym,_end=end \
54 -Wl,--defsym,_edata=__data_end__ \
55 -Wl,--defsym,_etext=etext -Wl,temp.exp
56
57 - $(RM) temp.exp
58 $(NM) --numeric-sort win32k.sys > win32k.sym
59
60 clean: $(CLEAN_FILES:%=%_clean)
61
62 $(CLEAN_FILES:%=%_clean): %_clean:
63 - $(RM) $*
64
65 .PHONY: clean $(CLEAN_FILES:%=%_clean)
66
67 #WITH_DEBUGGING = yes
68 WIN32_LEAN_AND_MEAN = yes
69 #WARNINGS_ARE_ERRORS = yes
70 include ../../rules.mak
71