2003-08-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
[reactos.git] / reactos / ntoskrnl / Makefile
1 # $Id: Makefile,v 1.104 2003/08/11 18:50:12 chorns Exp $
2 #
3 # ReactOS Operating System
4 #
5
6 #
7 # Path to the directory containing the root makefile
8 #
9 PATH_TO_TOP := ..
10
11 #
12 # Include details of the host OS configuration
13 #
14 include $(PATH_TO_TOP)/config
15
16 CONFIG :=
17
18 ifeq ($(DBG), 1)
19 CFLAGS_DBG := -g
20 LINKER_SCRIPT := ntoskrnl.lnk
21 STRIP_FLAGS := -Wl,-s
22 else
23 CFLAGS_DBG :=
24 LINKER_SCRIPT := ntoskrnl.lnk
25 STRIP_FLAGS := -Wl,-s
26 endif
27
28 ifeq ($(KDBG), 1)
29 OBJECTS_KDBG := dbg/kdb.o dbg/kdb_keyboard.o dbg/rdebug.o \
30 dbg/i386/kdb_help.o dbg/kdb_stabs.o dbg/profile.o
31 else
32 OBJECTS_KDBG :=
33 endif
34
35 ifeq ($(strip $(SDK_PATH_INC)),)
36 ASFLAGS += -I./include
37 CFLAGS += -I./include -D__NTOSKRNL__ $(CFLAGS_DBG) -Wall -Werror
38 else
39 ASFLAGS += -I./include -I$(SDK_PATH_INC)
40 CFLAGS += -I./include -I$(SDK_PATH_INC) -D__NTOSKRNL__ $(CFLAGS_DBG) -Wall -Werror
41 endif
42
43 # ASFLAGS += -D__USE_W32API -D_NTOSKRNL_
44 # CFLAGS += -D__USE_W32API -D_NTOSKRNL_
45
46 # require os code to explicitly request A/W version of structs/functions
47 CFLAGS += -D_DISABLE_TIDENTS
48
49 #
50 # Build configuration
51 #
52 include $(PATH_TO_TOP)/rules.mak
53
54
55 TARGETNAME := ntoskrnl
56
57 OBJECTS_PATH = objects
58
59 all: \
60 $(OBJECTS_PATH) \
61 bugcodes.rc \
62 $(TARGETNAME).nostrip.exe \
63 $(TARGETNAME).exe \
64 $(TARGETNAME).sym \
65 ntoskrnl.map
66
67 #
68 # Architecture specific Makefile
69 # Defines $(OBJECTS_ARCH)
70 #
71 include Makefile.$(ARCH)
72
73 # System API (Nt/Zw)
74 OBJECTS_NT = \
75 nt/channel.o \
76 nt/evtpair.o \
77 nt/mutant.o \
78 nt/misc.o \
79 nt/nt.o \
80 nt/ntevent.o \
81 nt/ntsem.o \
82 nt/nttimer.o \
83 nt/plugplay.o \
84 nt/profile.o \
85 nt/zw.o \
86 nt/vdm.o
87
88 # Run-Time Library (Rtl)
89 OBJECTS_RTL = \
90 rtl/atom.o \
91 rtl/bitmap.o \
92 rtl/compress.o \
93 rtl/ctype.o \
94 rtl/dos8dot3.o \
95 rtl/error.o \
96 rtl/handle.o \
97 rtl/largeint.o \
98 rtl/mem.o \
99 rtl/message.o \
100 rtl/nls.o \
101 rtl/purecall.o \
102 rtl/random.o \
103 rtl/regio.o \
104 rtl/sprintf.o \
105 rtl/stdlib.o \
106 rtl/string.o \
107 rtl/swprintf.o \
108 rtl/time.o \
109 rtl/timezone.o \
110 rtl/unicode.o \
111 rtl/wstring.o \
112 rtl/capture.o
113
114 OBJECTS_RTL := $(filter-out $(RTL_EXCLUDE_FILTER), $(OBJECTS_RTL))
115
116
117 # Kernel (Ke)
118 OBJECTS_KE = \
119 ke/apc.o \
120 ke/bug.o \
121 ke/catch.o \
122 ke/critical.o \
123 ke/dpc.o \
124 ke/error.o \
125 ke/event.o \
126 ke/kqueue.o \
127 ke/main.o \
128 ke/mutex.o \
129 ke/process.o \
130 ke/sem.o \
131 ke/spinlock.o \
132 ke/timer.o \
133 ke/wait.o \
134 ke/kthread.o \
135 ke/queue.o
136
137 # Memory Manager (Mm)
138 OBJECTS_MM = \
139 mm/aspace.o \
140 mm/cont.o \
141 mm/drvlck.o \
142 mm/freelist.o \
143 mm/iospace.o \
144 mm/marea.o \
145 mm/mdl.o \
146 mm/mm.o \
147 mm/ncache.o \
148 mm/npool.o \
149 mm/pagfault.o \
150 mm/pagefile.o \
151 mm/paging.o \
152 mm/pool.o \
153 mm/ppool.o \
154 mm/section.o \
155 mm/virtual.o \
156 mm/pager.o \
157 mm/wset.o \
158 mm/mminit.o \
159 mm/kmap.o \
160 mm/mpw.o \
161 mm/pageop.o \
162 mm/balance.o \
163 mm/rmap.o \
164 mm/slab.o \
165 mm/anonmem.o \
166 mm/region.o
167
168 # I/O Subsystem (Io)
169 OBJECTS_IO = \
170 io/adapter.o \
171 io/arcname.o \
172 io/buildirp.o \
173 io/cancel.o \
174 io/cleanup.o \
175 io/cntrller.o \
176 io/create.o \
177 io/device.o \
178 io/dir.o \
179 io/driver.o \
180 io/errlog.o \
181 io/error.o \
182 io/event.o \
183 io/file.o \
184 io/flush.o \
185 io/fs.o \
186 io/iocomp.o \
187 io/ioctrl.o \
188 io/iomgr.o \
189 io/iowork.o \
190 io/irp.o \
191 io/lock.o \
192 io/mailslot.o \
193 io/mdl.o \
194 io/npipe.o \
195 io/page.o \
196 io/parttab.o \
197 io/pnpmgr.o \
198 io/pnproot.o \
199 io/process.o \
200 io/queue.o \
201 io/rawfs.o \
202 io/resource.o \
203 io/rw.o \
204 io/share.o \
205 io/shutdown.o \
206 io/symlink.o \
207 io/timer.o \
208 io/vpb.o \
209 io/xhaldisp.o \
210 io/xhaldrv.o
211
212 # Object Manager (Ob)
213 OBJECTS_OB = \
214 ob/dirobj.o \
215 ob/handle.o \
216 ob/namespc.o \
217 ob/ntobj.o \
218 ob/object.o \
219 ob/security.o \
220 ob/symlink.o
221
222 # Process Manager (Ps)
223 OBJECTS_PS = \
224 ps/create.o \
225 ps/idle.o \
226 ps/kill.o \
227 ps/locale.o \
228 ps/process.o \
229 ps/psmgr.o \
230 ps/thread.o \
231 ps/tinfo.o \
232 ps/debug.o \
233 ps/suspend.o \
234 ps/win32.o \
235 ps/w32call.o
236
237 # Executive Subsystem (Ex)
238 OBJECTS_EX = \
239 ex/btree.o \
240 ex/callback.o \
241 ex/fmutex.o \
242 ex/hashtab.o \
243 ex/init.o \
244 ex/interlck.o \
245 ex/list.o \
246 ex/lookas.o \
247 ex/napi.o \
248 ex/power.o \
249 ex/resource.o \
250 ex/time.o \
251 ex/stree.o \
252 ex/sysinfo.o \
253 ex/win32k.o \
254 ex/work.o \
255 ex/zone.o
256
257 # Installable File System Run-Time Library (FsRtl)
258 OBJECTS_FS = \
259 fs/dbcsname.o \
260 fs/filelock.o \
261 fs/mcb.o \
262 fs/mdl.o \
263 fs/name.o \
264 fs/notify.o \
265 fs/oplock.o \
266 fs/pool.o \
267 fs/tunnel.o \
268 fs/unc.o \
269 fs/util.o
270
271 # Security Subsystem
272 OBJECTS_SE = \
273 se/access.o \
274 se/acl.o \
275 se/audit.o \
276 se/lsa.o \
277 se/luid.o \
278 se/priv.o \
279 se/sd.o \
280 se/semgr.o \
281 se/sid.o \
282 se/token.o
283
284 # Configuration Manager (Registry)
285 OBJECTS_CM = \
286 cm/import.o \
287 cm/registry.o \
288 cm/ntfunc.o \
289 cm/rtlfunc.o \
290 cm/regfile.o \
291 cm/regobj.o
292
293 # Debugger Support (Dbg)
294 OBJECTS_DBG = \
295 dbg/dbgctrl.o \
296 dbg/errinfo.o \
297 dbg/print.o \
298 dbg/user.o \
299 $(OBJECTS_KDBG)
300
301 # Loader
302 OBJECTS_LDR = \
303 ldr/init.o \
304 ldr/loader.o \
305 ldr/resource.o \
306 ldr/rtl.o \
307 ldr/sysdll.o \
308 ldr/userldr.o
309
310 # Local Procedure Call (Lpc)
311 OBJECTS_LPC = \
312 lpc/close.o \
313 lpc/complete.o \
314 lpc/connect.o \
315 lpc/create.o \
316 lpc/listen.o \
317 lpc/port.o \
318 lpc/query.o \
319 lpc/queue.o \
320 lpc/receive.o \
321 lpc/reply.o \
322 lpc/send.o
323
324 # Power Management (Po)
325 OBJECTS_PO = po/power.o
326
327 # Cache Manager (Cc)
328 OBJECTS_CC = \
329 cc/cacheman.o \
330 cc/view.o \
331 cc/copy.o \
332 cc/pin.o \
333 cc/misc.o
334
335 # Kernel Debugger Support (Kd)
336 OBJECTS_KD = \
337 kd/kdebug.o \
338 kd/service.o \
339 kd/dlog.o \
340 kd/gdbstub.o \
341 kd/mda.o
342
343 # Boot video (Inbv)
344 OBJECTS_INBV = \
345 inbv/inbv.o \
346 inbv/bootvid.o
347
348 DEP_OBJECTS := $(OBJECTS_NT) $(OBJECTS_MM) $(OBJECTS_ARCH) \
349 $(OBJECTS_IO) $(OBJECTS_KE) $(OBJECTS_OB) \
350 $(OBJECTS_PS) $(OBJECTS_EX) $(OBJECTS_CC) $(OBJECTS_FS) $(OBJECTS_SE) \
351 $(OBJECTS_DBG) $(OBJECTS_CM) $(OBJECTS_LDR) $(OBJECTS_LPC) \
352 $(OBJECTS_PO) $(OBJECTS_KD) $(OBJECTS_RTL)
353
354 TAG_OBJECTS := $(join $(dir $(DEP_OBJECTS)),$(patsubst %.o, .%.TAG, $(notdir $(DEP_OBJECTS))))
355
356 #
357 # Include automatic dependancy tracking
358 #
359 DEP_EXCLUDE_FILTER := ex/napi.% nt/zw.%
360 include $(PATH_TO_TOP)/tools/depend.mk
361
362
363 # Resources
364 OBJECTS_RESOURCE = \
365 $(TARGETNAME).coff
366
367 # IMPORTS/EXPORTS
368 IE_DATA = \
369 $(TARGETNAME).def \
370 $(TARGETNAME).edf
371
372 $(OBJECTS_PATH):
373 mkdir $(OBJECTS_PATH)
374
375 $(OBJECTS_RESOURCE): $(TARGETNAME).rc bugcodes.rc $(PATH_TO_TOP)/include/reactos/resource.h
376
377 #
378 # Build subsystem intermediate objects
379 #
380 $(OBJECTS_PATH)/arch.o: $(OBJECTS_ARCH)
381 $(LD) -r -o $(OBJECTS_PATH)/arch.o $(OBJECTS_ARCH)
382
383 $(OBJECTS_PATH)/io.o: $(OBJECTS_IO)
384 $(LD) \
385 -r \
386 -o $(OBJECTS_PATH)/io.o \
387 $(OBJECTS_IO)
388
389 $(OBJECTS_PATH)/ke.o: $(OBJECTS_KE)
390 $(LD) \
391 -r \
392 -o $(OBJECTS_PATH)/ke.o \
393 $(OBJECTS_KE)
394
395 $(OBJECTS_PATH)/rtl.o: $(OBJECTS_RTL)
396 $(LD) \
397 -r \
398 -o $(OBJECTS_PATH)/rtl.o \
399 $(OBJECTS_RTL)
400
401 $(OBJECTS_PATH)/mm.o: $(OBJECTS_MM)
402 $(LD) \
403 -r \
404 -o $(OBJECTS_PATH)/mm.o \
405 $(OBJECTS_MM)
406
407 $(OBJECTS_PATH)/ob.o: $(OBJECTS_OB)
408 $(LD) \
409 -r \
410 -o $(OBJECTS_PATH)/ob.o \
411 $(OBJECTS_OB)
412
413 $(OBJECTS_PATH)/ps.o: $(OBJECTS_PS)
414 $(LD) \
415 -r \
416 -o $(OBJECTS_PATH)/ps.o \
417 $(OBJECTS_PS)
418
419 $(OBJECTS_PATH)/ex.o: $(OBJECTS_EX)
420 $(LD) \
421 -r \
422 -o $(OBJECTS_PATH)/ex.o \
423 $(OBJECTS_EX)
424
425 $(OBJECTS_PATH)/fs.o: $(OBJECTS_FS)
426 $(LD) \
427 -r \
428 -o $(OBJECTS_PATH)/fs.o \
429 $(OBJECTS_FS)
430
431 $(OBJECTS_PATH)/se.o: $(OBJECTS_SE)
432 $(LD) \
433 -r \
434 -o $(OBJECTS_PATH)/se.o \
435 $(OBJECTS_SE)
436
437 $(OBJECTS_PATH)/cm.o: $(OBJECTS_CM)
438 $(LD) \
439 -r \
440 -o $(OBJECTS_PATH)/cm.o \
441 $(OBJECTS_CM)
442
443 $(OBJECTS_PATH)/dbg.o: $(OBJECTS_DBG)
444 $(LD) \
445 -r \
446 -o $(OBJECTS_PATH)/dbg.o \
447 $(OBJECTS_DBG)
448
449 $(OBJECTS_PATH)/ldr.o: $(OBJECTS_LDR)
450 $(LD) \
451 -r \
452 -o $(OBJECTS_PATH)/ldr.o \
453 $(OBJECTS_LDR)
454
455 $(OBJECTS_PATH)/lpc.o: $(OBJECTS_LPC)
456 $(LD) \
457 -r \
458 -o $(OBJECTS_PATH)/lpc.o \
459 $(OBJECTS_LPC)
460
461 $(OBJECTS_PATH)/nt.o: $(OBJECTS_NT)
462 $(LD) \
463 -r \
464 -o $(OBJECTS_PATH)/nt.o \
465 $(OBJECTS_NT)
466
467 $(OBJECTS_PATH)/po.o: $(OBJECTS_PO)
468 $(LD) \
469 -r \
470 -o $(OBJECTS_PATH)/po.o \
471 $(OBJECTS_PO)
472
473 $(OBJECTS_PATH)/cc.o: $(OBJECTS_CC)
474 $(LD) \
475 -r \
476 -o $(OBJECTS_PATH)/cc.o \
477 $(OBJECTS_CC)
478
479 $(OBJECTS_PATH)/kd.o: $(OBJECTS_KD)
480 $(LD) \
481 -r \
482 -o $(OBJECTS_PATH)/kd.o \
483 $(OBJECTS_KD)
484
485 $(OBJECTS_PATH)/inbv.o: $(OBJECTS_INBV)
486 $(LD) \
487 -r \
488 -o $(OBJECTS_PATH)/inbv.o \
489 $(OBJECTS_INBV)
490
491 # Note: arch.o MUST be the first file!!!
492 OBJECTS := \
493 $(OBJECTS_PATH)/arch.o \
494 $(OBJECTS_PATH)/ke.o \
495 $(OBJECTS_PATH)/cc.o \
496 $(OBJECTS_PATH)/cm.o \
497 $(OBJECTS_PATH)/dbg.o \
498 $(OBJECTS_PATH)/ex.o \
499 $(OBJECTS_PATH)/lpc.o \
500 $(OBJECTS_PATH)/fs.o \
501 $(OBJECTS_PATH)/io.o \
502 $(OBJECTS_PATH)/kd.o \
503 $(OBJECTS_PATH)/ldr.o \
504 $(OBJECTS_PATH)/mm.o \
505 $(OBJECTS_PATH)/nt.o \
506 $(OBJECTS_PATH)/ob.o \
507 $(OBJECTS_PATH)/po.o \
508 $(OBJECTS_PATH)/ps.o \
509 $(OBJECTS_PATH)/rtl.o \
510 $(OBJECTS_PATH)/se.o \
511 $(OBJECTS_PATH)/inbv.o \
512 $(OBJECTS_RESOURCE)
513
514
515 $(TARGETNAME).nostrip.exe: $(TARGETNAME).o $(IE_DATA) $(SDK_PATH_LIB)/string.a $(SDK_PATH_LIB)/rosrtl.a
516 $(CC) \
517 -Wl,-T,ntoskrnl.lnk \
518 -nostartfiles \
519 -nostdlib \
520 -mdll \
521 -o junk.tmp \
522 -Wl,--subsystem,native \
523 -Wl,--image-base,0xc0000000 \
524 -Wl,--file-alignment,0x1000 \
525 -Wl,--section-alignment,0x1000 \
526 -Wl,--entry,_NtProcessStartup \
527 -Wl,--base-file,base.tmp \
528 $(TARGETNAME).o -lgcc \
529 $(SDK_PATH_LIB)/string.a \
530 $(SDK_PATH_LIB)/rosrtl.a \
531 $(DDK_PATH_LIB)/hal.a
532 - $(RM) junk.tmp
533 $(DLLTOOL) \
534 --dllname $(TARGETNAME).exe \
535 --base-file base.tmp \
536 --output-exp temp.exp \
537 --def $(TARGETNAME).edf \
538 --kill-at
539 - $(RM) base.tmp
540 $(CC) \
541 -nostartfiles \
542 -nostdlib \
543 -Wl,-T,ntoskrnl.lnk \
544 -mdll \
545 -o $(TARGETNAME).nostrip.exe \
546 -Wl,--subsystem,native \
547 -Wl,--image-base,0xc0000000 \
548 -Wl,--file-alignment,0x1000 \
549 -Wl,--section-alignment,0x1000 \
550 -Wl,--entry,_NtProcessStartup \
551 -Wl,temp.exp \
552 $(TARGETNAME).o -lgcc \
553 $(SDK_PATH_LIB)/string.a \
554 $(SDK_PATH_LIB)/rosrtl.a \
555 $(DDK_PATH_LIB)/hal.a
556 - $(RM) temp.exp
557
558 $(TARGETNAME).exe: $(TARGETNAME).o $(LINKER_SCRIPT) $(DDK_PATH_LIB)/hal.a $(SDK_PATH_LIB)/string.a $(SDK_PATH_LIB)/rosrtl.a
559 - $(CC) \
560 -Wl,-T,$(LINKER_SCRIPT) \
561 -nostartfiles \
562 -nostdlib \
563 -mdll \
564 -o junk.tmp \
565 -Wl,--subsystem,native \
566 -Wl,--image-base,0xc0000000 \
567 -Wl,--file-alignment,0x1000 \
568 -Wl,--section-alignment,0x1000 \
569 -Wl,--entry,_NtProcessStartup \
570 -Wl,--base-file,base.tmp \
571 $(TARGETNAME).o -lgcc \
572 $(SDK_PATH_LIB)/string.a \
573 $(SDK_PATH_LIB)/rosrtl.a \
574 $(DDK_PATH_LIB)/hal.a
575 - $(RM) junk.tmp
576 $(DLLTOOL) \
577 --dllname $(TARGETNAME).exe \
578 --base-file base.tmp \
579 --output-exp temp.exp \
580 --def $(TARGETNAME).edf \
581 --kill-at
582 - $(RM) base.tmp
583 $(CC) \
584 -Wl,-T,$(LINKER_SCRIPT) $(STRIP_FLAGS)\
585 -nostartfiles \
586 -nostdlib \
587 -mdll \
588 -o $(TARGETNAME).exe \
589 -Wl,--subsystem,native \
590 -Wl,--image-base,0xc0000000 \
591 -Wl,--file-alignment,0x1000 \
592 -Wl,--section-alignment,0x1000 \
593 -Wl,--entry,_NtProcessStartup \
594 -Wl,temp.exp \
595 $(TARGETNAME).o -lgcc \
596 $(SDK_PATH_LIB)/string.a \
597 $(SDK_PATH_LIB)/rosrtl.a \
598 $(DDK_PATH_LIB)/hal.a
599 - $(RM) temp.exp
600
601 $(TARGETNAME).dbg.o: $(TARGETNAME).o
602 $(STRIP) --strip-debug -o $(TARGETNAME).dbg.o $(TARGETNAME).o
603
604 $(TARGETNAME).dbg: $(TARGETNAME).dbg.o $(TARGETNAME).a $(TARGETNAME).dbg.lnk $(DDK_PATH_LIB)/hal.a $(SDK_PATH_LIB)/string.a $(SDK_PATH_LIB)/rosrtl.a
605 $(CC) \
606 -Wl,-T,$(TARGETNAME).dbg.lnk \
607 -nostartfiles \
608 -nostdlib \
609 -mdll \
610 -o junk.tmp \
611 -Wl,--subsystem,native \
612 -Wl,--image-base,0xc0000000 \
613 -Wl,--file-alignment,0x1000 \
614 -Wl,--section-alignment,0x1000 \
615 -Wl,--entry,_NtProcessStartup \
616 -Wl,--base-file,base.tmp \
617 $(TARGETNAME).dbg.o -lgcc \
618 $(SDK_PATH_LIB)/string.a \
619 $(SDK_PATH_LIB)/rosrtl.a \
620 $(DDK_PATH_LIB)/hal.a
621 - $(RM) junk.tmp
622 $(DLLTOOL) \
623 --dllname $(TARGETNAME).dbg \
624 --base-file base.tmp \
625 --output-exp temp.exp \
626 --def $(TARGETNAME).edf \
627 --kill-at
628 - $(RM) base.tmp
629 $(CC) \
630 -Wl,-T,$(TARGETNAME).dbg.lnk \
631 -nostartfiles \
632 -nostdlib \
633 -mdll \
634 -o $(TARGETNAME).dbg \
635 -Wl,--subsystem,native \
636 -Wl,--image-base,0xc0000000 \
637 -Wl,--file-alignment,0x1000 \
638 -Wl,--section-alignment,0x1000 \
639 -Wl,--entry,_NtProcessStartup \
640 -Wl,temp.exp \
641 $(TARGETNAME).dbg.o -lgcc \
642 $(SDK_PATH_LIB)/string.a \
643 $(SDK_PATH_LIB)/rosrtl.a \
644 $(DDK_PATH_LIB)/hal.a
645 - $(RM) temp.exp
646
647 $(TARGETNAME).sym: $(TARGETNAME).nostrip.exe
648 $(RSYM) $(TARGETNAME).nostrip.exe $(TARGETNAME).sym
649
650 TAGS: $(TAG_OBJECTS)
651 etags $(addprefix -i , $(TAG_OBJECTS))
652
653 ntoskrnl.map: $(TARGETNAME).nostrip.exe
654 $(NM) --numeric-sort $(TARGETNAME).nostrip.exe > ntoskrnl.map
655
656 $(TARGETNAME).o: $(OBJECTS)
657 $(LD) \
658 -r \
659 -o $(TARGETNAME).o \
660 $(OBJECTS)
661
662 bugcodes.rc: ntoskrnl.mc
663 $(MC) \
664 -H $(PATH_TO_TOP)/include/reactos/bugcodes.h \
665 -o bugcodes.rc \
666 $(TARGETNAME).mc
667
668 $(DDK_PATH_LIB)/$(TARGETNAME).a: $(TARGETNAME).def
669 - $(DLLTOOL) \
670 --dllname $(TARGETNAME).exe \
671 --def $(TARGETNAME).def \
672 --output-lib $(DDK_PATH_LIB)/$(TARGETNAME).a \
673 --kill-at
674
675 implib: $(DDK_PATH_LIB)/$(TARGETNAME).a
676
677 clean:
678 - $(RM) $(OBJECTS_PATH)/*.o cc/*.o cm/*.o dbg/*.o dbg/i386/*.o ex/*.o \
679 ex/i386/*.o inbv/*.o io/*.o ke/*.o ldr/*.o mm/*.o nt/*.o ob/*.o ps/*.o \
680 rtl/*.o rtl/i386/*.o se/*.o ke/i386/*.o mm/i386/*.o fs/*.o po/*.o \
681 lpc/*.o kd/*.o $(TARGETNAME).o junk.tmp base.tmp temp.exp \
682 $(TARGETNAME).exe $(TARGETNAME).nostrip.exe $(TARGETNAME).sym ntoskrnl.map \
683 $(TARGETNAME).coff bugcodes.rc msg?????.bin $(DEP_FILES) \
684 $(TAG_OBJECTS)
685
686
687 .PHONY: clean
688
689 ifneq ($(BOOTCD_INSTALL),)
690
691 install: all $(INSTALL_DIR)/$(TARGETNAME).exe
692
693 $(INSTALL_DIR)/$(TARGETNAME).exe: $(TARGETNAME).exe
694 $(CP) $(TARGETNAME).exe $(INSTALL_DIR)/$(TARGETNAME).exe
695
696 else # BOOTCD_INSTALL
697
698 install: all $(INSTALL_DIR)/system32/$(TARGETNAME).exe $(INSTALL_DIR)/symbols/$(TARGETNAME).sym
699
700 $(INSTALL_DIR)/system32/$(TARGETNAME).exe: $(TARGETNAME).exe
701 $(CP) $(TARGETNAME).exe $(INSTALL_DIR)/system32/$(TARGETNAME).exe
702
703 $(INSTALL_DIR)/symbols/$(TARGETNAME).sym: $(TARGETNAME).sym
704 $(CP) $(TARGETNAME).sym $(INSTALL_DIR)/symbols/$(TARGETNAME).sym
705
706 endif # BOOTCD_INSTALL
707
708
709 .PHONY: install
710
711 dist: $(DIST_DIR)/$(TARGETNAME).exe
712
713 $(DIST_DIR)/$(TARGETNAME).exe: $(TARGETNAME).exe
714 $(CP) $(TARGETNAME).exe $(DIST_DIR)/$(TARGETNAME).exe
715
716 .PHONY: dist
717
718 bootcd: all $(BOOTCD_DIR)/reactos/$(TARGETNAME).exe
719
720 $(BOOTCD_DIR)/reactos/$(TARGETNAME).exe: $(TARGETNAME).exe
721 $(CP) $(TARGETNAME).exe $(BOOTCD_DIR)/reactos/$(TARGETNAME).exe
722
723 .PHONY: bootcd
724
725
726 ex/napi.o: ex/napi.c $(PATH_TO_TOP)/include/ntdll/napi.h
727
728 ke/main.o: ke/main.c $(PATH_TO_TOP)/include/reactos/buildno.h
729
730 %.o: %.cc
731 $(CC) $(CFLAGS) -c $< -o $@
732 %.o: %.c
733 $(CC) $(CFLAGS) -c $< -o $@
734 %.o: %.S
735 $(AS) $(ASFLAGS) -c $< -o $@
736 %.o: %.s
737 $(AS) $(ASFLAGS) -c $< -o $@
738 %.o: %.asm
739 $(NASM_CMD) $(NFLAGS) $< -o $@
740 %.coff: %.rc
741 $(RC) $(RCINC) $< -o $@
742
743 #
744 #
745 #
746 .%.TAG: %.S
747 etags -o $@ $<
748
749 .%.TAG: %.s
750 etags -o $@ $<
751
752 .%.TAG: %.c
753 etags -o $@ $^
754
755 # EOF