update for HEAD-2003091401
[reactos.git] / lib / kernel32 / makefile
1 # $Id$
2
3 PATH_TO_TOP = ../..
4
5 TARGET_TYPE = dynlink
6
7 TARGET_NAME = kernel32
8
9 TARGET_BASE = 0x77f00000
10
11 # require os code to explicitly request A/W version of structs/functions
12 TARGET_CFLAGS += -D_DISABLE_TIDENTS -Wall -Werror
13
14 TARGET_LFLAGS = -nostartfiles -nostdlib
15
16 TARGET_SDKLIBS = rosrtl.a ntdll.a
17
18 TARGET_GCCLIBS = gcc
19
20 TARGET_PCH = k32.h
21
22 TARGET_CLEAN = errcodes.rc msg?????.bin
23
24 SYNCH_OBJECTS = synch/critical.o synch/event.o synch/intrlck.o synch/mutex.o \
25                 synch/sem.o synch/timer.o synch/wait.o
26
27 MISC_OBJECTS = misc/error.o misc/atom.o misc/handle.o misc/env.o \
28                misc/dllmain.o misc/comm.o misc/errormsg.o \
29                misc/console.o misc/time.o misc/toolhelp.o \
30                misc/stubs.o misc/ldr.o misc/res.o \
31                misc/sysinfo.o misc/profile.o \
32                misc/mbchars.o misc/muldiv.o misc/computername.o \
33                misc/perfcnt.o misc/lzexpand_main.o
34
35 FILE_OBJECTS = file/file.o file/curdir.o file/lfile.o file/dir.o \
36                file/iocompl.o file/volume.o file/deviceio.o file/dosdev.o \
37                file/create.o file/find.o file/copy.o file/pipe.o \
38                file/move.o file/lock.o file/rw.o file/delete.o \
39                file/npipe.o file/tape.o file/mailslot.o file/backup.o \
40                file/cnotify.o
41
42 MEM_OBJECTS = mem/global.o mem/heap.o mem/isbad.o mem/local.o \
43               mem/procmem.o mem/section.o mem/virtual.o
44
45 NLS_OBJECTS =
46
47 THREAD_OBJECTS = \
48         thread/fiber.o  \
49         thread/thread.o \
50         thread/tls.o \
51         thread/fls.o
52
53 THREAD_I386_OBJECTS = \
54         thread/i386/fiber.o
55
56 PROCESS_OBJECTS = \
57         process/proc.o \
58         process/cmdline.o \
59         process/create.o \
60         process/session.o
61
62 STRING_OBJECTS = string/lstring.o
63
64 EXCEPT_OBJECTS = except/except.o
65
66 DEBUG_OBJECTS = debug/debugger.o debug/output.o debug/break.o
67
68 ARCH_OBJECTS = $(THREAD_I386_OBJECTS)
69
70 TARGET_OBJECTS = $(MISC_OBJECTS) $(FILE_OBJECTS) $(THREAD_OBJECTS) \
71                 $(PROCESS_OBJECTS) $(STRING_OBJECTS) $(MEM_OBJECTS) \
72                 $(SYNCH_OBJECTS) $(EXCEPT_OBJECTS) $(DEBUG_OBJECTS) \
73                 $(ARCH_OBJECTS)
74
75
76 DEP_OBJECTS = $(TARGET_OBJECTS)
77
78 include $(PATH_TO_TOP)/rules.mak
79
80 include $(TOOLS_PATH)/helper.mk
81
82 include $(TOOLS_PATH)/depend.mk
83
84 $(TARGET_NAME).coff: errcodes.rc
85
86 errcodes.rc: $(TARGET_NAME).mc
87         $(MC) \
88                 -H $(PATH_TO_TOP)/include/reactos/errcodes.h \
89                 -o errcodes.rc \
90                 $(TARGET_NAME).mc
91
92 %/TAGS:
93         etags -o $(@D)/TAGS $(@D)/\*.c
94
95 etags: except/TAGS file/TAGS mem/TAGS misc/TAGS nls/TAGS process/TAGS string/TAGS synch/TAGS thread/TAGS
96         etags -i except/TAGS -i file/TAGS -i mem/TAGS -i misc/TAGS -i nls/TAGS -i process/TAGS -i string/TAGS -i synch/TAGS -i thread/TAGS