f542ddeaa0d133c7d54d4c388f4fdc0ab4a3e121
[reactos.git] / reactos / subsys / win32k / makefile
1 # $Id: makefile,v 1.32 2001/06/04 14:39:43 chorns Exp $
2 #
3 # WIN32K.SYS build spec
4 #
5 PATH_TO_TOP = ../..
6
7 TARGET=win32k
8
9 # from atheos appserver makefile
10 COPTS = -pipe -O3 -I./freetype/include -c -Wall
11
12 CFLAGS = -I.
13
14 #define FT_FLAT_COMPILE
15
16 ENG_OBJECTS= eng/debug.o eng/mem.o eng/brush.o eng/bitblt.o eng/clip.o eng/copybits.o \
17 eng/device.o eng/handle.o eng/lineto.o eng/paint.o eng/palette.o \
18 eng/surface.o eng/xlate.o eng/transblt.o eng/mouse.o
19 MAIN_OBJECTS = main/dllmain.o
20 MISC_OBJECTS = misc/driver.o misc/math.o
21 LDR_OBJECTS = ldr/loader.o
22 NTUSER_OBJECTS = ntuser/stubs.o
23 OBJECTS_OBJECTS = objects/bitmaps.o objects/brush.o objects/cliprgn.o \
24 objects/color.o objects/coord.o objects/dc.o \
25 objects/fillshap.o objects/gdiobj.o objects/icm.o \
26 objects/line.o objects/metafile.o objects/paint.o \
27 objects/path.o objects/pen.o objects/print.o \
28 objects/region.o objects/text.o objects/wingl.o \
29 objects/bezier.o objects/objconv.o objects/dib.o objects/palette.o
30 DIB_OBJECTS = dib/dib4bpp.o dib/dib24bpp.o
31 FREETYPE_OBJECTS = freetype/grfont.o freetype/ctype.o \
32 freetype/ftsystem.o freetype/ftdebug.o freetype/ftinit.o freetype/ftbase.o \
33 freetype/ftglyph.o freetype/ftmm.o freetype/autohint.o freetype/cff.o \
34 freetype/type1cid.o freetype/psnames.o freetype/raster1.o freetype/sfnt.o \
35 freetype/smooth.o freetype/truetype.o freetype/winfnt.o freetype/type1z.o
36 RESOURCE_OBJECT = $(TARGET).coff
37 STUBS_OBJECTS = stubs/stubs.o
38
39 OBJECTS = $(ENG_OBJECTS) $(MAIN_OBJECTS) $(MISC_OBJECTS) $(LDR_OBJECTS) \
40 $(NTUSER_OBJECTS) $(OBJECTS_OBJECTS) $(RESOURCE_OBJECT) \
41 $(STUBS_OBJECTS) $(MATH_OBJECTS) $(FLOAT_OBJECTS) \
42 $(FREETYPE_OBJECTS) $(DIB_OBJECTS)
43
44 all: $(TARGET).sys
45
46 $(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
47
48 ifeq ($(DOSCLI),yes)
49 CLEAN_FILES = eng\*.o main\*.o misc\*.o ldr\*.o stubs\*.o objects\*.o \
50 freetype\*.o \
51 $(TARGET).coff $(TARGET).o $(TARGET).a \
52 junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sym
53 else
54 CLEAN_FILES = eng/*.o main/*.o ldr/*.o misc/*.o stubs/*.o objects/*.o \
55 freetype/*.o \
56 $(TARGET).coff $(TARGET).o $(TARGET).a \
57 junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sym
58 endif
59
60 $(TARGET).sys: $(OBJECTS) $(TARGET).def
61 $(LD) -r $(OBJECTS) -o $(TARGET).o
62 $(DLLTOOL) \
63 --dllname $(TARGET).sys \
64 --def $(TARGET).def \
65 --output-lib $(TARGET).a \
66 --kill-at
67 $(CC) \
68 -nostartfiles -nostdlib \
69 --subsystem=native \
70 -mdll \
71 --dll \
72 -e _DllMain@8 \
73 -o junk.tmp \
74 -Wl,--image-base,0x0 \
75 -Wl,--file-alignment,0x1000 \
76 -Wl,--section-alignment,0x1000 \
77 -Wl,--defsym,_end=end \
78 -Wl,--defsym,_edata=__data_end__ \
79 -Wl,--defsym,_etext=etext \
80 -Wl,--base-file,base.tmp $(TARGET).o \
81 ../../ntoskrnl/ntoskrnl.a
82 - $(RM) junk.tmp
83 $(DLLTOOL) \
84 --dllname $(TARGET).sys \
85 --base-file base.tmp \
86 --output-exp temp.exp \
87 --def $(TARGET).edf \
88 --kill-at
89 - $(RM) base.tmp
90 $(CC) \
91 -nostartfiles -nostdlib \
92 --subsystem=native \
93 -mdll \
94 --dll \
95 -e _DllMain@8 \
96 -o $(TARGET).sys \
97 $(TARGET).o \
98 ../../ntoskrnl/ntoskrnl.a \
99 -Wl,--image-base,0x0 \
100 -Wl,--file-alignment,0x1000 \
101 -Wl,--section-alignment,0x1000 \
102 -Wl,--defsym,_end=end \
103 -Wl,--defsym,_edata=__data_end__ \
104 -Wl,--defsym,_etext=etext \
105 -Wl,temp.exp
106
107 - $(RM) temp.exp
108 $(NM) --numeric-sort $(TARGET).sys > $(TARGET).sym
109
110 clean: $(CLEAN_FILES:%=%_clean)
111
112 $(CLEAN_FILES:%=%_clean): %_clean:
113 - $(RM) $*
114
115 .PHONY: clean $(CLEAN_FILES:%=%_clean)
116
117 install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
118
119 $(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
120 $(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
121
122 dist: $(DIST_DIR)/drivers/$(TARGET).sys
123
124 $(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
125 $(CP) $(TARGET).sys ../../$(DIST_DIR)/drivers/$(TARGET).sys
126
127 #WITH_DEBUGGING = yes
128 #WIN32_LEAN_AND_MEAN = yes
129 #WARNINGS_ARE_ERRORS = yes
130 include ../../rules.mak