source: trunk/makefile@ 8045

Last change on this file since 8045 was 7996, checked in by bird, 24 years ago

Added cleanall rule.

File size: 3.8 KB
RevLine 
[7996]1# $Id: makefile,v 1.20 2002-02-23 23:47:08 bird Exp $
[4]2
3#
[4723]4# Odin32
[4]5#
[4723]6# Top of the tree makefile
[4]7#
8#
[4770]9# Usage: nmake ( debug | nodebuginfo | profile | release | all | dep | clean )
[845]10#
[4723]11# debug: Change to a debug build.
12# debugsmp: Start nmake process in background that processes all
13# dlls in reverse
14# nodebuginfo: Change to a debug build without debug info in binaries
15# nodebuginfosmp: Change to an SMP debug build without debug info in binaries
[4770]16# profile: Change to a debug build with profiling hooks
[7994]17# profilesmp: Change to an SMP debug build with profiling hooks
[4723]18# release: Change to a release build.
19# releasesmp: Change to an SMP release build.
20# all: Build the entire tree.
21# dep: Make dependencies for the entire tree.
22# clean: Bring tree back to a "virgin" state.
[4]23#
[845]24#
[4723]25#
[4]26
[4717]27
[4643]28#
[4723]29# Check that makefile.inc exists, If it doesn't we'll try make it.
[4643]30#
[4723]31!if [.\tools\bin\Exists.cmd makefile.inc] == 1
32! if [configure.cmd noninteractive]
33! endif
34!endif
[4643]35
36
37#
[4723]38# Include makefile.
[4643]39#
[4723]40!include makefile.inc
[4643]41
[4]42
[6874]43#
44# (Re?)Define make command.
45#
46MAKE_CMD = $(MAKE) -nologo
[4723]47
[4770]48
[6874]49#
50# Build which are normally built.
51#
52BLDDIRS = src tools\install
53ALL_DIRS = include lib src tools
[4723]54
55
[6874]56#
57# The ordinary rules.
58#
59all: odin_libraries needed
60 @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) all
[4723]61
[6874]62clean nothing:
63 @$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) $@
[4723]64
[6874]65libs: lib
66lib dep: needed
67 @$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) $@
68
[7996]69cleanall:
70 SET DEBUG=
71 SET CCENV=VAC3
72 -@$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) clean
73 -@$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) DEBUG=1 clean
74 -@$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) PROFILE=1 clean
75 SET CCENV=VAC36
76 -@$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) clean
77 -@$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) DEBUG=1 clean
78 -@$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) PROFILE=1 clean
79 SET CCENV=WAT
80 -@$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) clean
81 -@$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) DEBUG=1 clean
82 -@$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) PROFILE=1 clean
[6874]83
[7996]84
[6874]85#
86# Special build mode rules.
87#
[7994]88debug: odin_libraries_debug needed
[6874]89 @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) DEBUG=1 all
90
[7994]91debugsmp: odin_libraries_debug needed
[6874]92 @$(DODIRS) "src" $(MAKE_CMD) DEBUG=1 smp
93 @$(DODIRS) "tools\install" $(MAKE_CMD) DEBUG=1 all
94
[7994]95nodebuginfo: odin_libraries_debug needed
[6874]96 @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) DEBUG=1 NODEBUGINFO=1 all
97
[7994]98nodebuginfosmp: odin_libraries_debug needed
[6874]99 @$(DODIRS) "src" $(MAKE_CMD) DEBUG=1 NODEBUGINFO=1 smp
100 @$(DODIRS) "tools\install" $(MAKE_CMD) DEBUG=1 NODEBUGINFO=1 all
101
[7994]102profile: odin_libraries_profile needed
[7505]103 SET PROFILEHOOKS=1
[6874]104 @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) DEBUG=1 PROFILE=1 all
[7994]105 SET PROFILEHOOKS=
[6874]106
[7994]107profilesmp: odin_libraries_profile needed
108 SET PROFILEHOOKS=1
[6874]109 @$(DODIRS) "src" $(MAKE_CMD) DEBUG=1 PROFILE=1 smp
110 @$(DODIRS) "tools\install" $(MAKE_CMD) DEBUG=1 PROFILE=1 all
[7994]111 SET PROFILEHOOKS=
[6874]112
[7994]113release: odin_libraries_release needed
[4723]114 SET DEBUG=
[6874]115 @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) all
[4723]116
[7994]117releasesmp: odin_libraries_release needed
[4723]118 SET DEBUG=
[6874]119 @$(DODIRS) "src" $(MAKE_CMD) smp
120 @$(DODIRS) "tools\install" $(MAKE_CMD) all
[4723]121
122
[6874]123#
124# Common rules.
125#
[4723]126odin_libraries:
[6874]127 @$(DODIRS) "lib" $(MAKE_CMD)
[4723]128
[7994]129odin_libraries_debug:
130 @$(DODIRS) "lib" $(MAKE_CMD) DEBUG=1
131
132odin_libraries_profile:
133 @$(DODIRS) "lib" $(MAKE_CMD) PROFILE=1
134
135odin_libraries_release:
136 SET DEBUG=
137 @$(DODIRS) "lib" $(MAKE_CMD)
138
[6874]139needed_tools: needed
140needed:
141 @$(DODIRS) "tools" $(MAKE_CMD) $@
[4723]142
Note: See TracBrowser for help on using the repository browser.