source: trunk/makefile@ 7788

Last change on this file since 7788 was 7505, checked in by phaller, 24 years ago

enabled PROFILEHOOKS automatically for profile build

File size: 2.7 KB
RevLine 
[7505]1# $Id: makefile,v 1.18 2001-11-30 18:30:51 phaller 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
[4723]17# release: Change to a release build.
18# releasesmp: Change to an SMP release build.
19# all: Build the entire tree.
20# dep: Make dependencies for the entire tree.
21# clean: Bring tree back to a "virgin" state.
[4]22#
[845]23#
[4723]24#
[4]25
[4717]26
[4643]27#
[4723]28# Check that makefile.inc exists, If it doesn't we'll try make it.
[4643]29#
[4723]30!if [.\tools\bin\Exists.cmd makefile.inc] == 1
31! if [configure.cmd noninteractive]
32! endif
33!endif
[4643]34
35
36#
[4723]37# Include makefile.
[4643]38#
[4723]39!include makefile.inc
[4643]40
[4]41
[6874]42#
43# (Re?)Define make command.
44#
45MAKE_CMD = $(MAKE) -nologo
[4723]46
[4770]47
[6874]48#
49# Build which are normally built.
50#
51BLDDIRS = src tools\install
52ALL_DIRS = include lib src tools
[4723]53
54
[6874]55#
56# The ordinary rules.
57#
58all: odin_libraries needed
59 @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) all
[4723]60
[6874]61clean nothing:
62 @$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) $@
[4723]63
[6874]64libs: lib
65lib dep: needed
66 @$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) $@
67
68
69#
70# Special build mode rules.
71#
72debug: odin_libraries needed
73 @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) DEBUG=1 all
74
75debugsmp: odin_libraries needed
76 @$(DODIRS) "src" $(MAKE_CMD) DEBUG=1 smp
77 @$(DODIRS) "tools\install" $(MAKE_CMD) DEBUG=1 all
78
79nodebuginfo: odin_libraries needed
80 @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) DEBUG=1 NODEBUGINFO=1 all
81
82nodebuginfosmp: odin_libraries needed
83 @$(DODIRS) "src" $(MAKE_CMD) DEBUG=1 NODEBUGINFO=1 smp
84 @$(DODIRS) "tools\install" $(MAKE_CMD) DEBUG=1 NODEBUGINFO=1 all
85
86profile: odin_libraries needed
[7505]87 SET PROFILEHOOKS=1
[6874]88 @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) DEBUG=1 PROFILE=1 all
89
90profilesmp: odin_libraries needed
91 @$(DODIRS) "src" $(MAKE_CMD) DEBUG=1 PROFILE=1 smp
92 @$(DODIRS) "tools\install" $(MAKE_CMD) DEBUG=1 PROFILE=1 all
93
94release: odin_libraries needed
[4723]95 SET DEBUG=
[6874]96 @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) all
[4723]97
[6874]98releasesmp: odin_libraries needed
[4723]99 SET DEBUG=
[6874]100 @$(DODIRS) "src" $(MAKE_CMD) smp
101 @$(DODIRS) "tools\install" $(MAKE_CMD) all
[4723]102
103
[6874]104#
105# Common rules.
106#
[4723]107odin_libraries:
[6874]108 @$(DODIRS) "lib" $(MAKE_CMD)
[4723]109
[6874]110needed_tools: needed
111needed:
112 @$(DODIRS) "tools" $(MAKE_CMD) $@
[4723]113
Note: See TracBrowser for help on using the repository browser.