1 | # $Id: makefile,v 1.17 2001-09-30 00:39: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 | # 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.
|
---|
22 | #
|
---|
23 | #
|
---|
24 | #
|
---|
25 |
|
---|
26 |
|
---|
27 | #
|
---|
28 | # Check that makefile.inc exists, If it doesn't we'll try make it.
|
---|
29 | #
|
---|
30 | !if [.\tools\bin\Exists.cmd makefile.inc] == 1
|
---|
31 | ! if [configure.cmd noninteractive]
|
---|
32 | ! endif
|
---|
33 | !endif
|
---|
34 |
|
---|
35 |
|
---|
36 | #
|
---|
37 | # Include makefile.
|
---|
38 | #
|
---|
39 | !include makefile.inc
|
---|
40 |
|
---|
41 |
|
---|
42 | #
|
---|
43 | # (Re?)Define make command.
|
---|
44 | #
|
---|
45 | MAKE_CMD = $(MAKE) -nologo
|
---|
46 |
|
---|
47 |
|
---|
48 | #
|
---|
49 | # Build which are normally built.
|
---|
50 | #
|
---|
51 | BLDDIRS = src tools\install
|
---|
52 | ALL_DIRS = include lib src tools
|
---|
53 |
|
---|
54 |
|
---|
55 | #
|
---|
56 | # The ordinary rules.
|
---|
57 | #
|
---|
58 | all: odin_libraries needed
|
---|
59 | @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) all
|
---|
60 |
|
---|
61 | clean nothing:
|
---|
62 | @$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) $@
|
---|
63 |
|
---|
64 | libs: lib
|
---|
65 | lib dep: needed
|
---|
66 | @$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) $@
|
---|
67 |
|
---|
68 |
|
---|
69 | #
|
---|
70 | # Special build mode rules.
|
---|
71 | #
|
---|
72 | debug: odin_libraries needed
|
---|
73 | @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) DEBUG=1 all
|
---|
74 |
|
---|
75 | debugsmp: odin_libraries needed
|
---|
76 | @$(DODIRS) "src" $(MAKE_CMD) DEBUG=1 smp
|
---|
77 | @$(DODIRS) "tools\install" $(MAKE_CMD) DEBUG=1 all
|
---|
78 |
|
---|
79 | nodebuginfo: odin_libraries needed
|
---|
80 | @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) DEBUG=1 NODEBUGINFO=1 all
|
---|
81 |
|
---|
82 | nodebuginfosmp: 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 |
|
---|
86 | profile: odin_libraries needed
|
---|
87 | @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) DEBUG=1 PROFILE=1 all
|
---|
88 |
|
---|
89 | profilesmp: odin_libraries needed
|
---|
90 | @$(DODIRS) "src" $(MAKE_CMD) DEBUG=1 PROFILE=1 smp
|
---|
91 | @$(DODIRS) "tools\install" $(MAKE_CMD) DEBUG=1 PROFILE=1 all
|
---|
92 |
|
---|
93 | release: odin_libraries needed
|
---|
94 | SET DEBUG=
|
---|
95 | @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) all
|
---|
96 |
|
---|
97 | releasesmp: odin_libraries needed
|
---|
98 | SET DEBUG=
|
---|
99 | @$(DODIRS) "src" $(MAKE_CMD) smp
|
---|
100 | @$(DODIRS) "tools\install" $(MAKE_CMD) all
|
---|
101 |
|
---|
102 |
|
---|
103 | #
|
---|
104 | # Common rules.
|
---|
105 | #
|
---|
106 | odin_libraries:
|
---|
107 | @$(DODIRS) "lib" $(MAKE_CMD)
|
---|
108 |
|
---|
109 | needed_tools: needed
|
---|
110 | needed:
|
---|
111 | @$(DODIRS) "tools" $(MAKE_CMD) $@
|
---|
112 |
|
---|