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 | #
|
---|
46 | MAKE_CMD = $(MAKE) -nologo
|
---|
47 |
|
---|
48 |
|
---|
49 | #
|
---|
50 | # Build which are normally built.
|
---|
51 | #
|
---|
52 | BLDDIRS = src tools\install
|
---|
53 | ALL_DIRS = include lib src tools
|
---|
54 |
|
---|
55 |
|
---|
56 | #
|
---|
57 | # The ordinary rules.
|
---|
58 | #
|
---|
59 | all: odin_libraries needed
|
---|
60 | @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) all
|
---|
61 |
|
---|
62 | clean nothing:
|
---|
63 | @$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) $@
|
---|
64 |
|
---|
65 | libs: lib
|
---|
66 | lib dep: needed
|
---|
67 | @$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) $@
|
---|
68 |
|
---|
69 | cleanall:
|
---|
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 | #
|
---|
78 | debug: odin_libraries_debug needed
|
---|
79 | @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) DEBUG=1 all
|
---|
80 |
|
---|
81 | debugsmp: odin_libraries_debug needed
|
---|
82 | @$(DODIRS) "src" $(MAKE_CMD) DEBUG=1 smp
|
---|
83 | @$(DODIRS) "tools\install" $(MAKE_CMD) DEBUG=1 all
|
---|
84 |
|
---|
85 | nodebuginfo: odin_libraries_debug needed
|
---|
86 | @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) DEBUG=1 NODEBUGINFO=1 all
|
---|
87 |
|
---|
88 | nodebuginfosmp: 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 |
|
---|
92 | profile: odin_libraries_profile needed
|
---|
93 | SET PROFILEHOOKS=1
|
---|
94 | @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) DEBUG=1 PROFILE=1 all
|
---|
95 | SET PROFILEHOOKS=
|
---|
96 |
|
---|
97 | profilesmp: 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 |
|
---|
103 | release: odin_libraries_release needed
|
---|
104 | SET DEBUG=
|
---|
105 | @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) all
|
---|
106 |
|
---|
107 | releasesmp: 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 | #
|
---|
116 | odin_libraries:
|
---|
117 | @$(DODIRS) "lib" $(MAKE_CMD)
|
---|
118 |
|
---|
119 | odin_libraries_debug:
|
---|
120 | @$(DODIRS) "lib" $(MAKE_CMD) DEBUG=1
|
---|
121 |
|
---|
122 | odin_libraries_profile:
|
---|
123 | @$(DODIRS) "lib" $(MAKE_CMD) PROFILE=1
|
---|
124 |
|
---|
125 | odin_libraries_release:
|
---|
126 | SET DEBUG=
|
---|
127 | @$(DODIRS) "lib" $(MAKE_CMD)
|
---|
128 |
|
---|
129 | needed_tools: needed
|
---|
130 | needed:
|
---|
131 | @$(DODIRS) "tools" $(MAKE_CMD) $@
|
---|
132 |
|
---|
133 | #
|
---|
134 | # Custombuild
|
---|
135 | #
|
---|
136 | custombuild: needed_tools odin_libraries
|
---|
137 | @$(DODIRS) "src" $(MAKE_CMD) custombuild
|
---|
138 |
|
---|
139 | custombuild_all custombuild_clean custombuild_dep:
|
---|
140 | @$(DODIRS) "src" $(MAKE_CMD) $@
|
---|
141 |
|
---|