adding win32ksys the syscall lib for win32k
[reactos.git] / reactos / tools / nci / nci.mak
1 NCI_BASE = $(TOOLS_BASE_)nci
2 NCI_BASE_ = $(NCI_BASE)$(SEP)
3 NCI_INT = $(INTERMEDIATE_)$(NCI_BASE)
4 NCI_INT_ = $(NCI_INT)$(SEP)
5 NCI_OUT = $(OUTPUT_)$(NCI_BASE)
6 NCI_OUT_ = $(NCI_OUT)$(SEP)
7
8 $(NCI_INT): | $(TOOLS_INT)
9 $(ECHO_MKDIR)
10 ${mkdir} $@
11
12 ifneq ($(INTERMEDIATE),$(OUTPUT))
13 $(NCI_OUT): | $(TOOLS_OUT)
14 $(ECHO_MKDIR)
15 ${mkdir} $@
16 endif
17
18 NCI_TARGET = \
19 $(EXEPREFIX)$(NCI_OUT_)nci$(EXEPOSTFIX)
20
21 NCI_SOURCES = \
22 $(NCI_BASE_)ncitool.c
23
24 NCI_OBJECTS = \
25 $(addprefix $(INTERMEDIATE_), $(NCI_SOURCES:.c=.o))
26
27 NCI_HOST_CFLAGS = -Iinclude $(TOOLS_CFLAGS)
28
29 NCI_HOST_LFLAGS = $(TOOLS_LFLAGS)
30
31 $(NCI_TARGET): $(NCI_OBJECTS) | $(NCI_OUT)
32 $(ECHO_LD)
33 ${host_gcc} $(NCI_OBJECTS) $(NCI_HOST_LFLAGS) -o $@
34
35 $(NCI_INT_)ncitool.o: $(NCI_BASE_)ncitool.c | $(NCI_INT)
36 $(ECHO_CC)
37 ${host_gcc} $(NCI_HOST_CFLAGS) -c $< -o $@
38
39 .PHONY: nci_clean
40 nci_clean:
41 -@$(rm) $(NCI_TARGET) $(NCI_OBJECTS) 2>$(NUL)
42 clean: nci_clean
43
44 # WIN32K.SYS
45 WIN32K_SVC_DB = subsystems$(SEP)win32$(SEP)win32k$(SEP)w32ksvc.db
46 WIN32K_SERVICE_TABLE = subsystems$(SEP)win32$(SEP)win32k$(SEP)include$(SEP)napi.h
47 WIN32K_GDI_STUBS = lib$(SEP)win32ksys$(SEP)$(ARCH)$(SEP)win32k.S
48 WIN32K_USER_STUBS = lib$(SEP)win32ksys$(SEP)$(ARCH)$(SEP)win32k.S
49
50
51
52 # NTOSKRNL.EXE
53 KERNEL_SVC_DB = ntoskrnl$(SEP)sysfuncs.lst
54 KERNEL_SERVICE_TABLE = ntoskrnl$(SEP)include$(SEP)internal$(SEP)napi.h
55 NTDLL_STUBS = dll$(SEP)ntdll$(SEP)$(ARCH)$(SEP)napi.S
56 KERNEL_STUBS = ntoskrnl$(SEP)ex$(SEP)$(ARCH)$(SEP)zw.S
57
58 NCI_SERVICE_FILES = \
59 $(KERNEL_SERVICE_TABLE) \
60 $(WIN32K_SERVICE_TABLE) \
61 $(NTDLL_STUBS) \
62 $(KERNEL_STUBS) \
63 $(WIN32K_GDI_STUBS) \
64 $(WIN32K_USER_STUBS)
65
66 $(NCI_SERVICE_FILES): $(NCI_TARGET) $(KERNEL_SVC_DB) $(WIN32K_SVC_DB)
67 $(ECHO_NCI)
68 ${mkdir} dll$(SEP)ntdll$(SEP)$(ARCH) 2>$(NUL)
69 ${mkdir} ntoskrnl$(SEP)ex$(SEP)$(ARCH) 2>$(NUL)
70 ${mkdir} dll$(SEP)win32$(SEP)gdi32$(SEP)misc$(SEP)$(ARCH) 2>$(NUL)
71 ${mkdir} dll$(SEP)win32$(SEP)user32$(SEP)misc$(SEP)$(ARCH) 2>$(NUL)
72 ${mkdir} lib$(SEP)win32ksys$(SEP)$(ARCH) 2>$(NUL)
73
74 $(Q)$(NCI_TARGET) -arch $(ARCH) \
75 $(KERNEL_SVC_DB) \
76 $(WIN32K_SVC_DB) \
77 $(KERNEL_SERVICE_TABLE) \
78 $(WIN32K_SERVICE_TABLE) \
79 $(NTDLL_STUBS) \
80 $(KERNEL_STUBS) \
81 $(WIN32K_GDI_STUBS) \
82 $(WIN32K_USER_STUBS)
83
84 .PHONY: nci_service_files_clean
85 nci_service_files_clean:
86 -@$(rm) $(NCI_SERVICE_FILES) 2>$(NUL)
87 clean: nci_service_files_clean