Fixed hal display and initialization code.
[reactos.git] / reactos / ntoskrnl / makefile_rex
1 # $Id: makefile_rex,v 1.32 1999/10/16 00:17:40 ekohl Exp $
2 #
3 # ReactOS Operating System
4 #
5 TARGET=ntoskrnl
6
7 BASE_CFLAGS = -I../include
8
9 all: objects $(TARGET).exe
10
11 #
12 # Defines $(HAL_OBJECTS)
13 #
14 include hal/x86/sources
15
16 NT_OBJECTS = nt/port.o nt/channel.o nt/ntevent.o nt/nttimer.o nt/atom.o \
17 nt/evtpair.o nt/ntsem.o nt/mutant.o nt/misc.o nt/plugplay.o \
18 nt/profile.o nt/nt.o nt/zw.o
19
20 RTL_OBJECTS = rtl/vsprintf.o rtl/lookas.o rtl/unicode.o rtl/time.o \
21 rtl/unalign.o rtl/mem.o rtl/largeint.o rtl/ctype.o \
22 rtl/list.o rtl/slist.o rtl/interlck.o rtl/return.o \
23 rtl/wstring.o rtl/memcpy.o rtl/memmove.o rtl/memset.o \
24 rtl/memchr.o rtl/string.o rtl/stdlib.o
25
26 KE_OBJECTS = ke/main.o ke/timer.o ke/error.o ke/catch.o \
27 ke/dpc.o ke/wait.o ke/kqueue.o ke/dispatch.o \
28 ke/sem.o ke/critical.o ke/event.o ke/apc.o ke/bug.o \
29 ke/mutex.o ke/kernel.o ke/ldt.o ke/apchelp.o \
30 ke/process.o ke/gdt.o
31
32 MM_OBJECTS = mm/mm.o mm/freelist.o mm/pool.o mm/virtual.o \
33 mm/mdl.o mm/zone.o mm/special.o mm/paging.o \
34 mm/section.o mm/marea.o mm/ppool.o mm/npool.o
35
36
37 IO_OBJECTS = io/iomgr.o io/create.o io/irp.o io/device.o io/rw.o \
38 io/queue.o io/drvlck.o io/timer.o io/share.o io/errlog.o \
39 io/shutdown.o io/fdisk.o io/cancel.o io/error.o io/arc.o \
40 io/dpc.o io/symlink.o io/adapter.o io/cntrller.o io/mdl.o \
41 io/resource.o io/event.o io/process.o io/file.o io/ioctrl.o \
42 io/fs.o io/vpb.o io/buildirp.o io/flush.o io/dir.o io/iocomp.o \
43 io/mailslot.o io/npipe.o io/lock.o io/page.o io/cleanup.o
44
45 OB_OBJECTS = ob/object.o ob/handle.o ob/namespc.o ob/ntobj.o ob/dirobj.o
46
47 PS_OBJECTS = ps/psmgr.o ps/thread.o ps/process.o ps/idle.o ps/kill.o \
48 ps/tinfo.o
49
50 EX_OBJECTS = ex/work.o ex/fmutex.o ex/resource.o ex/time.o ex/interlck.o \
51 ex/callback.o ex/napi.o ex/power.o ex/sysinfo.o ex/locale.o \
52 ex/stamp.o ex/init.o
53
54 SE_OBJECTS = se/semgr.o
55
56 CM_OBJECTS = cm/registry.o
57
58 DBG_OBJECTS = dbg/brkpoint.o dbg/errinfo.o dbg/print.o
59
60 LDR_OBJECTS = ldr/loader.o ldr/init.o ldr/syspath.o
61
62 CC_OBJECTS = cc/cacheman.o cc/view.o
63
64 RESOURCE_OBJECT = $(TARGET).coff
65
66 objects:
67 mkdir objects
68
69 objects/hal.o: $(HAL_OBJECTS)
70 $(LD) -r $(HAL_OBJECTS) -o objects/hal.o
71
72 objects/io.o: $(IO_OBJECTS)
73 $(LD) -r $(IO_OBJECTS) -o objects/io.o
74
75 objects/ke.o: $(KE_OBJECTS)
76 $(LD) -r $(KE_OBJECTS) -o objects/ke.o
77
78 objects/rtl.o: $(RTL_OBJECTS)
79 $(LD) -r $(RTL_OBJECTS) -o objects/rtl.o
80
81 objects/mm.o: $(MM_OBJECTS)
82 $(LD) -r $(MM_OBJECTS) -o objects/mm.o
83
84 objects/ob.o: $(OB_OBJECTS)
85 $(LD) -r $(OB_OBJECTS) -o objects/ob.o
86
87 objects/ps.o: $(PS_OBJECTS)
88 $(LD) -r $(PS_OBJECTS) -o objects/ps.o
89
90 objects/ex.o: $(EX_OBJECTS)
91 $(LD) -r $(EX_OBJECTS) -o objects/ex.o
92
93 objects/se.o: $(SE_OBJECTS)
94 $(LD) -r $(SE_OBJECTS) -o objects/se.o
95
96 objects/cm.o: $(CM_OBJECTS)
97 $(LD) -r $(CM_OBJECTS) -o objects/cm.o
98
99 objects/dbg.o: $(DBG_OBJECTS)
100 $(LD) -r $(DBG_OBJECTS) -o objects/dbg.o
101
102 objects/ldr.o: $(LDR_OBJECTS)
103 $(LD) -r $(LDR_OBJECTS) -o objects/ldr.o
104
105 objects/nt.o: $(NT_OBJECTS)
106 $(LD) -r $(NT_OBJECTS) -o objects/nt.o
107
108 objects/cc.o: $(CC_OBJECTS)
109 $(LD) -r $(CC_OBJECTS) -o objects/cc.o
110
111 $(TARGET).coff: $(TARGET).rc ../include/reactos/resource.h
112
113
114 OBJECTS = objects/hal.o objects/ke.o objects/rtl.o objects/mm.o \
115 objects/io.o objects/ob.o objects/ps.o objects/ex.o \
116 objects/se.o objects/cm.o objects/dbg.o \
117 objects/nt.o objects/cc.o objects/ldr.o \
118 $(TARGET).coff
119
120 ifeq ($(DOSCLI),yes)
121 CLEAN_FILES = objects\*.o cc\*.o cm\*.o dbg\*.o ex\*.o hal\x86\*.o io\*.o \
122 ke\*.o ldr\*.o mm\*.o nt\*.o ob\*.o ps\*.o rtl\*.o se\*.o \
123 utils\export\export.exe $(TARGET).o $(TARGET).a junk.tmp \
124 base.tmp temp.exp $(TARGET).exe $(TARGET).sym $(TARGET).coff
125 else
126 CLEAN_FILES = objects/*.o cc/*.o cm/*.o dbg/*.o ex/*.o hal/x86/*.o io/*.o \
127 ke/*.o ldr/*.o mm/*.o nt/*.o ob/*.o ps/*.o rtl/*.o se/*.o \
128 utils/export/export $(TARGET).o $(TARGET).a junk.tmp base.tmp \
129 temp.exp $(TARGET).exe $(TARGET).sym $(TARGET).coff
130 endif
131
132 $(TARGET).exe: $(OBJECTS) $(TARGET).def
133 $(LD) \
134 -r $(OBJECTS) \
135 -o $(TARGET).o
136 $(DLLTOOL) \
137 --dllname $(TARGET).exe \
138 --def $(TARGET).def \
139 --kill-at \
140 --output-lib $(TARGET).a
141 $(CC) \
142 $(TARGET).o \
143 -Wl,-d -specs=../specs \
144 -mdll \
145 -o junk.tmp \
146 -Wl,--image-base,0xc0000000 \
147 -Wl,--file-alignment,0x1000 \
148 -Wl,--section-alignment,0x1000 \
149 -Wl,--defsym,_edata=__data_end__ \
150 -Wl,--defsym,_end=__bss_end__ \
151 -Wl,--defsym,_etext=etext \
152 -Wl,--base-file,base.tmp
153 - $(RM) junk.tmp
154 $(DLLTOOL) \
155 --dllname $(TARGET).exe \
156 --base-file base.tmp \
157 --output-exp temp.exp \
158 --def $(TARGET).edf
159 - $(RM) base.tmp
160 $(CC) \
161 $(TARGET).o \
162 -Wl,-d -specs=../specs \
163 -mdll \
164 -o $(TARGET).exe \
165 -Wl,--image-base,0xc0000000 \
166 -Wl,--file-alignment,0x1000 \
167 -Wl,--section-alignment,0x1000 \
168 -Wl,--defsym,_end=__bss_end__ \
169 -Wl,--defsym,_edata=__data_end__ \
170 -Wl,--defsym,_etext=etext \
171 -Wl,temp.exp
172 - $(RM) temp.exp
173 $(NM) --numeric-sort $(TARGET).exe > $(TARGET).sym
174
175 $(TARGET).o: $(OBJECTS)
176 $(LD) -r $(OBJECTS) -o $(TARGET).o
177
178 $(TARGET).a: $(TARGET).def
179 $(DLLTOOL) \
180 --dllname $(TARGET).exe \
181 --def $(TARGET).def \
182 --output-lib $(TARGET).a
183
184 clean: $(CLEAN_FILES:%=%_clean)
185
186 $(CLEAN_FILES:%=%_clean): %_clean:
187 - $(RM) $*
188
189 .PHONY: clean $(CLEAN_FILES:%=%_clean)
190
191 floppy: $(FLOPPY_DIR)/$(TARGET).exe
192
193 $(FLOPPY_DIR)/$(TARGET).exe: $(TARGET).exe
194 ifeq ($(DOSCLI),yes)
195 $(CP) $(TARGET).exe $(FLOPPY_DIR)\$(TARGET).exe
196 else
197 $(CP) $(TARGET).exe $(FLOPPY_DIR)/$(TARGET).exe
198 endif
199
200 .PHONY: dist
201
202 dist: ../$(DIST_DIR)/$(TARGET).exe
203
204 ../$(DIST_DIR)/$(TARGET).exe: $(TARGET).exe
205 ifeq ($(DOSCLI),yes)
206 $(CP) $(TARGET).exe ..\$(DIST_DIR)\$(TARGET).exe
207 else
208 $(CP) $(TARGET).exe ../$(DIST_DIR)/$(TARGET).exe
209 endif
210
211 .PHONY: dist
212
213 ex/napi.o: ex/napi.c ../include/ntdll/napi.h
214
215 #WITH_DEBUGGING = yes
216 WIN32_LEAN_AND_MEAN = yes
217 #WARNINGS_ARE_ERRORS = yes
218 include ../rules.mak
219