cb86968d50b5ab05793a52b96cfcba0b437f8f1e
[reactos.git] / reactos / ntoskrnl / Makefile
1 # $Id: Makefile,v 1.103 2003/08/07 04:03:24 royce 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 DEP_OBJECTS := $(OBJECTS_NT) $(OBJECTS_MM) $(OBJECTS_ARCH) \
344 $(OBJECTS_IO) $(OBJECTS_KE) $(OBJECTS_OB) \
345 $(OBJECTS_PS) $(OBJECTS_EX) $(OBJECTS_CC) $(OBJECTS_FS) $(OBJECTS_SE) \
346 $(OBJECTS_DBG) $(OBJECTS_CM) $(OBJECTS_LDR) $(OBJECTS_LPC) \
347 $(OBJECTS_PO) $(OBJECTS_KD) $(OBJECTS_RTL)
348
349 TAG_OBJECTS := $(join $(dir $(DEP_OBJECTS)),$(patsubst %.o, .%.TAG, $(notdir $(DEP_OBJECTS))))
350
351 #
352 # Include automatic dependancy tracking
353 #
354 DEP_EXCLUDE_FILTER := ex/napi.% nt/zw.%
355 include $(PATH_TO_TOP)/tools/depend.mk
356
357
358 # Resources
359 OBJECTS_RESOURCE = \
360 $(TARGETNAME).coff
361
362 # IMPORTS/EXPORTS
363 IE_DATA = \
364 $(TARGETNAME).def \
365 $(TARGETNAME).edf
366
367 $(OBJECTS_PATH):
368 mkdir $(OBJECTS_PATH)
369
370 $(OBJECTS_RESOURCE): $(TARGETNAME).rc bugcodes.rc $(PATH_TO_TOP)/include/reactos/resource.h
371
372 #
373 # Build subsystem intermediate objects
374 #
375 $(OBJECTS_PATH)/arch.o: $(OBJECTS_ARCH)
376 $(LD) -r -o $(OBJECTS_PATH)/arch.o $(OBJECTS_ARCH)
377
378 $(OBJECTS_PATH)/io.o: $(OBJECTS_IO)
379 $(LD) \
380 -r \
381 -o $(OBJECTS_PATH)/io.o \
382 $(OBJECTS_IO)
383
384 $(OBJECTS_PATH)/ke.o: $(OBJECTS_KE)
385 $(LD) \
386 -r \
387 -o $(OBJECTS_PATH)/ke.o \
388 $(OBJECTS_KE)
389
390 $(OBJECTS_PATH)/rtl.o: $(OBJECTS_RTL)
391 $(LD) \
392 -r \
393 -o $(OBJECTS_PATH)/rtl.o \
394 $(OBJECTS_RTL)
395
396 $(OBJECTS_PATH)/mm.o: $(OBJECTS_MM)
397 $(LD) \
398 -r \
399 -o $(OBJECTS_PATH)/mm.o \
400 $(OBJECTS_MM)
401
402 $(OBJECTS_PATH)/ob.o: $(OBJECTS_OB)
403 $(LD) \
404 -r \
405 -o $(OBJECTS_PATH)/ob.o \
406 $(OBJECTS_OB)
407
408 $(OBJECTS_PATH)/ps.o: $(OBJECTS_PS)
409 $(LD) \
410 -r \
411 -o $(OBJECTS_PATH)/ps.o \
412 $(OBJECTS_PS)
413
414 $(OBJECTS_PATH)/ex.o: $(OBJECTS_EX)
415 $(LD) \
416 -r \
417 -o $(OBJECTS_PATH)/ex.o \
418 $(OBJECTS_EX)
419
420 $(OBJECTS_PATH)/fs.o: $(OBJECTS_FS)
421 $(LD) \
422 -r \
423 -o $(OBJECTS_PATH)/fs.o \
424 $(OBJECTS_FS)
425
426 $(OBJECTS_PATH)/se.o: $(OBJECTS_SE)
427 $(LD) \
428 -r \
429 -o $(OBJECTS_PATH)/se.o \
430 $(OBJECTS_SE)
431
432 $(OBJECTS_PATH)/cm.o: $(OBJECTS_CM)
433 $(LD) \
434 -r \
435 -o $(OBJECTS_PATH)/cm.o \
436 $(OBJECTS_CM)
437
438 $(OBJECTS_PATH)/dbg.o: $(OBJECTS_DBG)
439 $(LD) \
440 -r \
441 -o $(OBJECTS_PATH)/dbg.o \
442 $(OBJECTS_DBG)
443
444 $(OBJECTS_PATH)/ldr.o: $(OBJECTS_LDR)
445 $(LD) \
446 -r \
447 -o $(OBJECTS_PATH)/ldr.o \
448 $(OBJECTS_LDR)
449
450 $(OBJECTS_PATH)/lpc.o: $(OBJECTS_LPC)
451 $(LD) \
452 -r \
453 -o $(OBJECTS_PATH)/lpc.o \
454 $(OBJECTS_LPC)
455
456 $(OBJECTS_PATH)/nt.o: $(OBJECTS_NT)
457 $(LD) \
458 -r \
459 -o $(OBJECTS_PATH)/nt.o \
460 $(OBJECTS_NT)
461
462 $(OBJECTS_PATH)/po.o: $(OBJECTS_PO)
463 $(LD) \
464 -r \
465 -o $(OBJECTS_PATH)/po.o \
466 $(OBJECTS_PO)
467
468 $(OBJECTS_PATH)/cc.o: $(OBJECTS_CC)
469 $(LD) \
470 -r \
471 -o $(OBJECTS_PATH)/cc.o \
472 $(OBJECTS_CC)
473
474 $(OBJECTS_PATH)/kd.o: $(OBJECTS_KD)
475 $(LD) \
476 -r \
477 -o $(OBJECTS_PATH)/kd.o \
478 $(OBJECTS_KD)
479
480 # Note: arch.o MUST be the first file!!!
481 OBJECTS := \
482 $(OBJECTS_PATH)/arch.o \
483 $(OBJECTS_PATH)/ke.o \
484 $(OBJECTS_PATH)/cc.o \
485 $(OBJECTS_PATH)/cm.o \
486 $(OBJECTS_PATH)/dbg.o \
487 $(OBJECTS_PATH)/ex.o \
488 $(OBJECTS_PATH)/lpc.o \
489 $(OBJECTS_PATH)/fs.o \
490 $(OBJECTS_PATH)/io.o \
491 $(OBJECTS_PATH)/kd.o \
492 $(OBJECTS_PATH)/ldr.o \
493 $(OBJECTS_PATH)/mm.o \
494 $(OBJECTS_PATH)/nt.o \
495 $(OBJECTS_PATH)/ob.o \
496 $(OBJECTS_PATH)/po.o \
497 $(OBJECTS_PATH)/ps.o \
498 $(OBJECTS_PATH)/rtl.o \
499 $(OBJECTS_PATH)/se.o \
500 $(OBJECTS_RESOURCE)
501
502
503 $(TARGETNAME).nostrip.exe: $(TARGETNAME).o $(IE_DATA) $(SDK_PATH_LIB)/string.a $(SDK_PATH_LIB)/rosrtl.a
504 $(CC) \
505 -Wl,-T,ntoskrnl.lnk \
506 -nostartfiles \
507 -nostdlib \
508 -mdll \
509 -o junk.tmp \
510 -Wl,--subsystem,native \
511 -Wl,--image-base,0xc0000000 \
512 -Wl,--file-alignment,0x1000 \
513 -Wl,--section-alignment,0x1000 \
514 -Wl,--entry,_NtProcessStartup \
515 -Wl,--base-file,base.tmp \
516 $(TARGETNAME).o -lgcc \
517 $(SDK_PATH_LIB)/string.a \
518 $(SDK_PATH_LIB)/rosrtl.a \
519 $(DDK_PATH_LIB)/hal.a
520 - $(RM) junk.tmp
521 $(DLLTOOL) \
522 --dllname $(TARGETNAME).exe \
523 --base-file base.tmp \
524 --output-exp temp.exp \
525 --def $(TARGETNAME).edf \
526 --kill-at
527 - $(RM) base.tmp
528 $(CC) \
529 -nostartfiles \
530 -nostdlib \
531 -Wl,-T,ntoskrnl.lnk \
532 -mdll \
533 -o $(TARGETNAME).nostrip.exe \
534 -Wl,--subsystem,native \
535 -Wl,--image-base,0xc0000000 \
536 -Wl,--file-alignment,0x1000 \
537 -Wl,--section-alignment,0x1000 \
538 -Wl,--entry,_NtProcessStartup \
539 -Wl,temp.exp \
540 $(TARGETNAME).o -lgcc \
541 $(SDK_PATH_LIB)/string.a \
542 $(SDK_PATH_LIB)/rosrtl.a \
543 $(DDK_PATH_LIB)/hal.a
544 - $(RM) temp.exp
545
546 $(TARGETNAME).exe: $(TARGETNAME).o $(LINKER_SCRIPT) $(DDK_PATH_LIB)/hal.a $(SDK_PATH_LIB)/string.a $(SDK_PATH_LIB)/rosrtl.a
547 - $(CC) \
548 -Wl,-T,$(LINKER_SCRIPT) \
549 -nostartfiles \
550 -nostdlib \
551 -mdll \
552 -o junk.tmp \
553 -Wl,--subsystem,native \
554 -Wl,--image-base,0xc0000000 \
555 -Wl,--file-alignment,0x1000 \
556 -Wl,--section-alignment,0x1000 \
557 -Wl,--entry,_NtProcessStartup \
558 -Wl,--base-file,base.tmp \
559 $(TARGETNAME).o -lgcc \
560 $(SDK_PATH_LIB)/string.a \
561 $(SDK_PATH_LIB)/rosrtl.a \
562 $(DDK_PATH_LIB)/hal.a
563 - $(RM) junk.tmp
564 $(DLLTOOL) \
565 --dllname $(TARGETNAME).exe \
566 --base-file base.tmp \
567 --output-exp temp.exp \
568 --def $(TARGETNAME).edf \
569 --kill-at
570 - $(RM) base.tmp
571 $(CC) \
572 -Wl,-T,$(LINKER_SCRIPT) $(STRIP_FLAGS)\
573 -nostartfiles \
574 -nostdlib \
575 -mdll \
576 -o $(TARGETNAME).exe \
577 -Wl,--subsystem,native \
578 -Wl,--image-base,0xc0000000 \
579 -Wl,--file-alignment,0x1000 \
580 -Wl,--section-alignment,0x1000 \
581 -Wl,--entry,_NtProcessStartup \
582 -Wl,temp.exp \
583 $(TARGETNAME).o -lgcc \
584 $(SDK_PATH_LIB)/string.a \
585 $(SDK_PATH_LIB)/rosrtl.a \
586 $(DDK_PATH_LIB)/hal.a
587 - $(RM) temp.exp
588
589 $(TARGETNAME).dbg.o: $(TARGETNAME).o
590 $(STRIP) --strip-debug -o $(TARGETNAME).dbg.o $(TARGETNAME).o
591
592 $(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
593 $(CC) \
594 -Wl,-T,$(TARGETNAME).dbg.lnk \
595 -nostartfiles \
596 -nostdlib \
597 -mdll \
598 -o junk.tmp \
599 -Wl,--subsystem,native \
600 -Wl,--image-base,0xc0000000 \
601 -Wl,--file-alignment,0x1000 \
602 -Wl,--section-alignment,0x1000 \
603 -Wl,--entry,_NtProcessStartup \
604 -Wl,--base-file,base.tmp \
605 $(TARGETNAME).dbg.o -lgcc \
606 $(SDK_PATH_LIB)/string.a \
607 $(SDK_PATH_LIB)/rosrtl.a \
608 $(DDK_PATH_LIB)/hal.a
609 - $(RM) junk.tmp
610 $(DLLTOOL) \
611 --dllname $(TARGETNAME).dbg \
612 --base-file base.tmp \
613 --output-exp temp.exp \
614 --def $(TARGETNAME).edf \
615 --kill-at
616 - $(RM) base.tmp
617 $(CC) \
618 -Wl,-T,$(TARGETNAME).dbg.lnk \
619 -nostartfiles \
620 -nostdlib \
621 -mdll \
622 -o $(TARGETNAME).dbg \
623 -Wl,--subsystem,native \
624 -Wl,--image-base,0xc0000000 \
625 -Wl,--file-alignment,0x1000 \
626 -Wl,--section-alignment,0x1000 \
627 -Wl,--entry,_NtProcessStartup \
628 -Wl,temp.exp \
629 $(TARGETNAME).dbg.o -lgcc \
630 $(SDK_PATH_LIB)/string.a \
631 $(SDK_PATH_LIB)/rosrtl.a \
632 $(DDK_PATH_LIB)/hal.a
633 - $(RM) temp.exp
634
635 $(TARGETNAME).sym: $(TARGETNAME).nostrip.exe
636 $(RSYM) $(TARGETNAME).nostrip.exe $(TARGETNAME).sym
637
638 TAGS: $(TAG_OBJECTS)
639 etags $(addprefix -i , $(TAG_OBJECTS))
640
641 ntoskrnl.map: $(TARGETNAME).nostrip.exe
642 $(NM) --numeric-sort $(TARGETNAME).nostrip.exe > ntoskrnl.map
643
644 $(TARGETNAME).o: $(OBJECTS)
645 $(LD) \
646 -r \
647 -o $(TARGETNAME).o \
648 $(OBJECTS)
649
650 bugcodes.rc: ntoskrnl.mc
651 $(MC) \
652 -H $(PATH_TO_TOP)/include/reactos/bugcodes.h \
653 -o bugcodes.rc \
654 $(TARGETNAME).mc
655
656 $(DDK_PATH_LIB)/$(TARGETNAME).a: $(TARGETNAME).def
657 - $(DLLTOOL) \
658 --dllname $(TARGETNAME).exe \
659 --def $(TARGETNAME).def \
660 --output-lib $(DDK_PATH_LIB)/$(TARGETNAME).a \
661 --kill-at
662
663 implib: $(DDK_PATH_LIB)/$(TARGETNAME).a
664
665 clean:
666 - $(RM) $(OBJECTS_PATH)/*.o cc/*.o cm/*.o dbg/*.o dbg/i386/*.o ex/*.o \
667 ex/i386/*.o io/*.o ke/*.o ldr/*.o mm/*.o nt/*.o ob/*.o ps/*.o \
668 rtl/*.o rtl/i386/*.o se/*.o ke/i386/*.o mm/i386/*.o fs/*.o po/*.o \
669 lpc/*.o kd/*.o $(TARGETNAME).o junk.tmp base.tmp temp.exp \
670 $(TARGETNAME).exe $(TARGETNAME).nostrip.exe $(TARGETNAME).sym ntoskrnl.map \
671 $(TARGETNAME).coff bugcodes.rc msg?????.bin $(DEP_FILES) \
672 $(TAG_OBJECTS)
673
674
675 .PHONY: clean
676
677 ifneq ($(BOOTCD_INSTALL),)
678
679 install: all $(INSTALL_DIR)/$(TARGETNAME).exe
680
681 $(INSTALL_DIR)/$(TARGETNAME).exe: $(TARGETNAME).exe
682 $(CP) $(TARGETNAME).exe $(INSTALL_DIR)/$(TARGETNAME).exe
683
684 else # BOOTCD_INSTALL
685
686 install: all $(INSTALL_DIR)/system32/$(TARGETNAME).exe $(INSTALL_DIR)/symbols/$(TARGETNAME).sym
687
688 $(INSTALL_DIR)/system32/$(TARGETNAME).exe: $(TARGETNAME).exe
689 $(CP) $(TARGETNAME).exe $(INSTALL_DIR)/system32/$(TARGETNAME).exe
690
691 $(INSTALL_DIR)/symbols/$(TARGETNAME).sym: $(TARGETNAME).sym
692 $(CP) $(TARGETNAME).sym $(INSTALL_DIR)/symbols/$(TARGETNAME).sym
693
694 endif # BOOTCD_INSTALL
695
696
697 .PHONY: install
698
699 dist: $(DIST_DIR)/$(TARGETNAME).exe
700
701 $(DIST_DIR)/$(TARGETNAME).exe: $(TARGETNAME).exe
702 $(CP) $(TARGETNAME).exe $(DIST_DIR)/$(TARGETNAME).exe
703
704 .PHONY: dist
705
706 bootcd: all $(BOOTCD_DIR)/reactos/$(TARGETNAME).exe
707
708 $(BOOTCD_DIR)/reactos/$(TARGETNAME).exe: $(TARGETNAME).exe
709 $(CP) $(TARGETNAME).exe $(BOOTCD_DIR)/reactos/$(TARGETNAME).exe
710
711 .PHONY: bootcd
712
713
714 ex/napi.o: ex/napi.c $(PATH_TO_TOP)/include/ntdll/napi.h
715
716 ke/main.o: ke/main.c $(PATH_TO_TOP)/include/reactos/buildno.h
717
718 %.o: %.cc
719 $(CC) $(CFLAGS) -c $< -o $@
720 %.o: %.c
721 $(CC) $(CFLAGS) -c $< -o $@
722 %.o: %.S
723 $(AS) $(ASFLAGS) -c $< -o $@
724 %.o: %.s
725 $(AS) $(ASFLAGS) -c $< -o $@
726 %.o: %.asm
727 $(NASM_CMD) $(NFLAGS) $< -o $@
728 %.coff: %.rc
729 $(RC) $(RCINC) $< -o $@
730
731 #
732 #
733 #
734 .%.TAG: %.S
735 etags -o $@ $<
736
737 .%.TAG: %.s
738 etags -o $@ $<
739
740 .%.TAG: %.c
741 etags -o $@ $^
742
743 # EOF