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