source: trunk/src/makefile@ 6502

Last change on this file since 6502 was 6447, checked in by bird, 24 years ago

Use COMMONRULES macro.

File size: 3.4 KB
Line 
1# $Id: makefile,v 1.75 2001-08-04 14:14:41 bird Exp $
2
3#
4# Odin32 API
5#
6# Top of the src tree makefile
7#
8#
9# Usage: nmake ( all | libs | dep | clean )
10#
11# all: Build the entire src tree.
12# lib: Builds the libraries.
13# dep: Builds depenency information for the entire src tree.
14# clean: Bring src tree back to a "virgin" state.
15#
16#
17#
18
19
20#
21# Build environment.
22#
23!include ../makefile.inc
24
25
26#
27# Exclude lists which is to be passed in to DOWITHDIRS
28#
29NOTTOBEMADE = CVS;pe2lx;odin32api;odinwps;spy;odinldr;msvcrt;ws2help;win16ldr;oslib;custombuild # generally not made
30NOTDLLS = $(NOTTOBEMADE);peldr;dllentry # not dlls
31NOTHAVELIBS = $(NOTTOBEMADE);peldr # don't generate libs
32NOTWIN32DLLS= $(NOTDLLS);win32k;odincrt;dllentry # not win32 dlls.
33
34
35#
36# Check for SMP and MASSIVE.
37# SMP: Working backwards thru the directories traversed by a rule.
38# MASSIVE: Spawn a child processes for each process.
39#
40!ifdef SMP
41EXTRA = -r
42!endif
43!ifdef MASSIVE
44EXTRA = -s start "Odin32 Massive Build" /B /C
45!endif
46
47
48
49#
50# All rule. Make libraries and then build every directory.
51#
52all: libs build
53
54
55
56#
57# Smp rule - Dual build. Starts a second build process after libraries
58# was made.
59#
60smp: startsmp libs build
61
62startsmp: # Internal helper for the smp rule.
63 start "Odin32 SMP Build Process" /B $(MAKE_CMD) SMP=1 libs build
64
65
66#
67# Rules which supports the SMP and MASSIVE features.
68#
69# build: Invokes the all rule in every directory.
70# clean: Invokes the clean rule in every directory.
71# lib(s): Invokes the lib rule in every directory known to support it.
72# dep: Invokes the dep rule in every directory.
73#
74build:
75 $(DOWITHDIRS) -e$(NOTTOBEMADE) -lbld$(CCENV)$(DEBUG) -c $(EXTRA) \
76 $(MAKE_CMD) all
77
78lib libs:
79 $(DOWITHDIRS) -e$(NOTHAVELIBS) -c -llib $(EXTRA) \
80 $(MAKE_CMD) lib
81
82dep:
83 $(DOWITHDIRS) -e$(NOTTOBEMADE) -c -ldep $(EXTRA) \
84 $(MAKE_CMD) NODEP=1 dep
85
86clean:
87 $(DOWITHDIRS) -e$(NOTTOBEMADE) -c -lcln$(CCENV)$(DEBUG) $(EXTRA) \
88 $(MAKE_CMD) NODEP=1 clean
89
90$(COMMONRULES:clean dep lib all=):
91 $(DOWITHDIRS) -e$(NOTTOBEMADE) -c -l$@$(CCENV)$(DEBUG) $(EXTRA) \
92 $(MAKE_CMD) $@
93
94
95#
96# Custom rules
97#
98CUSTOMBUILD = kernel32 user32 gdi32 comctl32 comdlg32 shell32 shlwapi msvfw32 wsock32 winmm ole32 rpcrt4 version lz32
99custombuild:
100 $(DODIRS) "$(CUSTOMBUILD)" $(MAKE_CMD) all CUSTOMBUILD=1
101 $(DODIRS) ".\win32k\lib custombuild" $(MAKE_CMD) all
102
103custombuild_all custombuild_clean custombuild_dep:
104 $(DODIRS) "$(CUSTOMBUILD)" $(MAKE_CMD) $(@:custombuild_=) CUSTOMBUILD=1
105 $(DODIRS) ".\win32k\lib custombuild" $(MAKE_CMD) $(@:custombuild_=)
106
107
108#
109# Odin32 API DB Management
110#
111APIImport:
112 $(DOWITHDIRS) -e$(NOTWIN32DLLS) -cp \
113 ..\..\tools\bin\APIImport.cmd
114
115StateUpd:
116 ..\tools\bin\StateUpd.exe -io+
117 -$(DOWITHDIRS) -e$(NOTWIN32DLLS) -cp -i \
118 ..\..\tools\bin\StateUpd.cmd -ie- -ib-
119 ..\tools\bin\StateUpd.exe -io+
120
121ReadSignals:
122 -$(DOWITHDIRS) -e$(NOTWIN32DLLS) -cp -i \
123 IF EXIST signals.log list signals.log
124
125ReadStateUpdLogs:
126 -$(DOWITHDIRS) -e$(NOTWIN32DLLS) -cp -i \
127 IF EXIST stateupd.log list stateupd.log
128
129ReadAPIImportLogs:
130 -$(DOWITHDIRS) -e$(NOTWIN32DLLS) -cp -i \
131 IF EXIST apiimport.log list apiimport.log
132
133CleanDBLogs:
134 $(DOWITHDIRS) -e$(NOTWIN32DLLS) -cp \
135 $(RM) apiimport.log signals.log stateupd.log apiimport.def
136 $(RM) signals.log stateupd.log
137
Note: See TracBrowser for help on using the repository browser.