source: trunk/makefile@ 10367

Last change on this file since 10367 was 10312, checked in by bird, 22 years ago

added custombuild rules.

File size: 3.5 KB
Line 
1# $Id: makefile,v 1.22 2003-11-11 14:01:51 bird Exp $
2
3#
4# Odin32
5#
6# Top of the tree makefile
7#
8#
9# Usage: nmake ( debug | nodebuginfo | profile | release | all | dep | clean )
10#
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
16# profile: Change to a debug build with profiling hooks
17# profilesmp: Change to an SMP debug build with profiling hooks
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.
23#
24#
25#
26
27
28#
29# Check that makefile.inc exists, If it doesn't we'll try make it.
30#
31!if [.\tools\bin\Exists.cmd makefile.inc] == 1
32! if [configure.cmd noninteractive]
33! endif
34!endif
35
36
37#
38# Include makefile.
39#
40!include makefile.inc
41
42
43#
44# (Re?)Define make command.
45#
46MAKE_CMD = $(MAKE) -nologo
47
48
49#
50# Build which are normally built.
51#
52BLDDIRS = src tools\install
53ALL_DIRS = include lib src tools
54
55
56#
57# The ordinary rules.
58#
59all: odin_libraries needed
60 @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) all
61
62clean nothing:
63 @$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) $@
64
65libs: lib
66lib dep: needed
67 @$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) $@
68
69cleanall:
70 SET CCENV=VAC3
71 -@$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) NODEP=1 cleanall
72 rm -Rf bin\Debug* bin\Release\* bin\Profile*
73
74
75#
76# Special build mode rules.
77#
78debug: odin_libraries_debug needed
79 @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) DEBUG=1 all
80
81debugsmp: odin_libraries_debug needed
82 @$(DODIRS) "src" $(MAKE_CMD) DEBUG=1 smp
83 @$(DODIRS) "tools\install" $(MAKE_CMD) DEBUG=1 all
84
85nodebuginfo: odin_libraries_debug needed
86 @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) DEBUG=1 NODEBUGINFO=1 all
87
88nodebuginfosmp: odin_libraries_debug needed
89 @$(DODIRS) "src" $(MAKE_CMD) DEBUG=1 NODEBUGINFO=1 smp
90 @$(DODIRS) "tools\install" $(MAKE_CMD) DEBUG=1 NODEBUGINFO=1 all
91
92profile: odin_libraries_profile needed
93 SET PROFILEHOOKS=1
94 @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) DEBUG=1 PROFILE=1 all
95 SET PROFILEHOOKS=
96
97profilesmp: odin_libraries_profile needed
98 SET PROFILEHOOKS=1
99 @$(DODIRS) "src" $(MAKE_CMD) DEBUG=1 PROFILE=1 smp
100 @$(DODIRS) "tools\install" $(MAKE_CMD) DEBUG=1 PROFILE=1 all
101 SET PROFILEHOOKS=
102
103release: odin_libraries_release needed
104 SET DEBUG=
105 @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) all
106
107releasesmp: odin_libraries_release needed
108 SET DEBUG=
109 @$(DODIRS) "src" $(MAKE_CMD) smp
110 @$(DODIRS) "tools\install" $(MAKE_CMD) all
111
112
113#
114# Common rules.
115#
116odin_libraries:
117 @$(DODIRS) "lib" $(MAKE_CMD)
118
119odin_libraries_debug:
120 @$(DODIRS) "lib" $(MAKE_CMD) DEBUG=1
121
122odin_libraries_profile:
123 @$(DODIRS) "lib" $(MAKE_CMD) PROFILE=1
124
125odin_libraries_release:
126 SET DEBUG=
127 @$(DODIRS) "lib" $(MAKE_CMD)
128
129needed_tools: needed
130needed:
131 @$(DODIRS) "tools" $(MAKE_CMD) $@
132
133#
134# Custombuild
135#
136custombuild: needed_tools odin_libraries
137 @$(DODIRS) "src" $(MAKE_CMD) custombuild
138
139custombuild_all custombuild_clean custombuild_dep:
140 @$(DODIRS) "src" $(MAKE_CMD) $@
141
Note: See TracBrowser for help on using the repository browser.