| [6540] | 1 | # $Id: makefile,v 1.76 2001-08-16 04:07:46 bird Exp $
 | 
|---|
| [4] | 2 | 
 | 
|---|
 | 3 | #
 | 
|---|
| [4722] | 4 | # Odin32 API
 | 
|---|
| [4] | 5 | #
 | 
|---|
 | 6 | #       Top of the src tree makefile
 | 
|---|
 | 7 | #
 | 
|---|
 | 8 | #
 | 
|---|
| [2715] | 9 | #       Usage: nmake ( all | libs | dep | clean )
 | 
|---|
| [4] | 10 | #
 | 
|---|
 | 11 | #            all: Build the entire src tree.
 | 
|---|
| [1585] | 12 | #            lib: Builds the libraries.
 | 
|---|
| [2715] | 13 | #            dep: Builds depenency information for the entire src tree.
 | 
|---|
| [4] | 14 | #            clean: Bring src tree back to a "virgin" state.
 | 
|---|
 | 15 | #
 | 
|---|
 | 16 | #
 | 
|---|
 | 17 | #
 | 
|---|
| [2715] | 18 | 
 | 
|---|
 | 19 | 
 | 
|---|
| [4644] | 20 | #
 | 
|---|
 | 21 | # Build environment.
 | 
|---|
 | 22 | #
 | 
|---|
| [4722] | 23 | !include ../makefile.inc
 | 
|---|
| [4] | 24 | 
 | 
|---|
| [1492] | 25 | 
 | 
|---|
| [2734] | 26 | #
 | 
|---|
 | 27 | # Exclude lists which is to be passed in to DOWITHDIRS
 | 
|---|
 | 28 | #
 | 
|---|
| [6376] | 29 | NOTTOBEMADE = CVS;pe2lx;odin32api;odinwps;spy;odinldr;msvcrt;ws2help;win16ldr;oslib;custombuild   # generally not made
 | 
|---|
| [2743] | 30 | NOTDLLS     = $(NOTTOBEMADE);peldr;dllentry             # not dlls
 | 
|---|
 | 31 | NOTHAVELIBS = $(NOTTOBEMADE);peldr                      # don't generate libs
 | 
|---|
| [2932] | 32 | NOTWIN32DLLS= $(NOTDLLS);win32k;odincrt;dllentry        # not win32 dlls.
 | 
|---|
| [1492] | 33 | 
 | 
|---|
| [1585] | 34 | 
 | 
|---|
| [4644] | 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
 | 
|---|
 | 41 | EXTRA = -r
 | 
|---|
 | 42 | !endif
 | 
|---|
 | 43 | !ifdef MASSIVE
 | 
|---|
 | 44 | EXTRA = -s start "Odin32 Massive Build" /B /C
 | 
|---|
 | 45 | !endif
 | 
|---|
| [4] | 46 | 
 | 
|---|
| [4644] | 47 | 
 | 
|---|
 | 48 | 
 | 
|---|
| [2909] | 49 | #
 | 
|---|
| [4644] | 50 | # All rule. Make libraries and then build every directory.
 | 
|---|
| [2909] | 51 | #
 | 
|---|
| [4644] | 52 | all: libs build
 | 
|---|
 | 53 | 
 | 
|---|
 | 54 | 
 | 
|---|
 | 55 | 
 | 
|---|
| [2909] | 56 | #
 | 
|---|
| [4644] | 57 | # Smp rule - Dual build. Starts a second build process after libraries
 | 
|---|
 | 58 | #            was made.
 | 
|---|
 | 59 | #
 | 
|---|
 | 60 | smp: startsmp libs build
 | 
|---|
| [1585] | 61 | 
 | 
|---|
| [4644] | 62 | startsmp:   # Internal helper for the smp rule.
 | 
|---|
 | 63 |     start "Odin32 SMP Build Process" /B $(MAKE_CMD) SMP=1 libs build
 | 
|---|
| [2909] | 64 | 
 | 
|---|
 | 65 | 
 | 
|---|
| [4644] | 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 | #
 | 
|---|
 | 74 | build:
 | 
|---|
| [5942] | 75 |     $(DOWITHDIRS) -e$(NOTTOBEMADE) -lbld$(CCENV)$(DEBUG) -c $(EXTRA) \
 | 
|---|
| [4644] | 76 |         $(MAKE_CMD) all
 | 
|---|
| [1585] | 77 | 
 | 
|---|
| [4644] | 78 | lib libs:
 | 
|---|
 | 79 |     $(DOWITHDIRS) -e$(NOTHAVELIBS) -c -llib $(EXTRA) \
 | 
|---|
 | 80 |         $(MAKE_CMD) lib
 | 
|---|
 | 81 | 
 | 
|---|
| [2715] | 82 | dep:
 | 
|---|
| [4644] | 83 |     $(DOWITHDIRS) -e$(NOTTOBEMADE) -c -ldep $(EXTRA) \
 | 
|---|
| [6540] | 84 |         $(CMDQD_SUB) $(MAKE_CMD) NODEP=1 dep
 | 
|---|
 | 85 |     $(CMDQD_WAIT)
 | 
|---|
| [2715] | 86 | 
 | 
|---|
| [4] | 87 | clean:
 | 
|---|
| [5942] | 88 |     $(DOWITHDIRS) -e$(NOTTOBEMADE) -c -lcln$(CCENV)$(DEBUG) $(EXTRA) \
 | 
|---|
| [6540] | 89 |         $(CMDQD_SUB)  $(MAKE_CMD) NODEP=1 clean
 | 
|---|
 | 90 |     $(CMDQD_WAIT)
 | 
|---|
| [1649] | 91 | 
 | 
|---|
| [6447] | 92 | $(COMMONRULES:clean dep lib all=):
 | 
|---|
 | 93 |     $(DOWITHDIRS) -e$(NOTTOBEMADE) -c -l$@$(CCENV)$(DEBUG) $(EXTRA) \
 | 
|---|
 | 94 |         $(MAKE_CMD) $@
 | 
|---|
| [2743] | 95 | 
 | 
|---|
| [6447] | 96 | 
 | 
|---|
| [2743] | 97 | #
 | 
|---|
| [6422] | 98 | # Custom rules
 | 
|---|
 | 99 | #
 | 
|---|
 | 100 | CUSTOMBUILD = kernel32 user32 gdi32 comctl32 comdlg32 shell32 shlwapi msvfw32 wsock32 winmm ole32 rpcrt4 version lz32
 | 
|---|
 | 101 | custombuild:
 | 
|---|
 | 102 |     $(DODIRS) "$(CUSTOMBUILD)" $(MAKE_CMD) all CUSTOMBUILD=1
 | 
|---|
 | 103 |     $(DODIRS) ".\win32k\lib custombuild" $(MAKE_CMD) all
 | 
|---|
 | 104 | 
 | 
|---|
 | 105 | custombuild_all custombuild_clean custombuild_dep:
 | 
|---|
 | 106 |     $(DODIRS) "$(CUSTOMBUILD)" $(MAKE_CMD) $(@:custombuild_=) CUSTOMBUILD=1
 | 
|---|
 | 107 |     $(DODIRS) ".\win32k\lib custombuild" $(MAKE_CMD) $(@:custombuild_=)
 | 
|---|
 | 108 | 
 | 
|---|
 | 109 | 
 | 
|---|
 | 110 | #
 | 
|---|
| [2743] | 111 | # Odin32 API DB Management
 | 
|---|
 | 112 | #
 | 
|---|
| [2749] | 113 | APIImport:
 | 
|---|
| [2930] | 114 |     $(DOWITHDIRS) -e$(NOTWIN32DLLS) -cp \
 | 
|---|
| [2743] | 115 |         ..\..\tools\bin\APIImport.cmd
 | 
|---|
 | 116 | 
 | 
|---|
| [2749] | 117 | StateUpd:
 | 
|---|
| [2788] | 118 |     ..\tools\bin\StateUpd.exe -io+
 | 
|---|
| [2930] | 119 |     -$(DOWITHDIRS) -e$(NOTWIN32DLLS) -cp -i \
 | 
|---|
| [3941] | 120 |         ..\..\tools\bin\StateUpd.cmd -ie- -ib-
 | 
|---|
| [2788] | 121 |     ..\tools\bin\StateUpd.exe -io+
 | 
|---|
| [2743] | 122 | 
 | 
|---|
| [2749] | 123 | ReadSignals:
 | 
|---|
| [3941] | 124 |     -$(DOWITHDIRS) -e$(NOTWIN32DLLS) -cp -i \
 | 
|---|
| [2749] | 125 |         IF EXIST signals.log list signals.log
 | 
|---|
 | 126 | 
 | 
|---|
 | 127 | ReadStateUpdLogs:
 | 
|---|
| [3941] | 128 |     -$(DOWITHDIRS) -e$(NOTWIN32DLLS) -cp -i \
 | 
|---|
| [2751] | 129 |         IF EXIST stateupd.log list stateupd.log
 | 
|---|
| [2749] | 130 | 
 | 
|---|
 | 131 | ReadAPIImportLogs:
 | 
|---|
| [3941] | 132 |     -$(DOWITHDIRS) -e$(NOTWIN32DLLS) -cp -i \
 | 
|---|
| [2749] | 133 |         IF EXIST apiimport.log list apiimport.log
 | 
|---|
 | 134 | 
 | 
|---|
 | 135 | CleanDBLogs:
 | 
|---|
| [2743] | 136 |     $(DOWITHDIRS) -e$(NOTWIN32DLLS) -cp \
 | 
|---|
 | 137 |         $(RM) apiimport.log signals.log stateupd.log apiimport.def
 | 
|---|
| [2750] | 138 |     $(RM) signals.log stateupd.log
 | 
|---|
| [2743] | 139 | 
 | 
|---|