[10312] | 1 | # $Id: makefile,v 1.22 2003-11-11 14:01:51 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 | #
|
---|
| 46 | MAKE_CMD = $(MAKE) -nologo
|
---|
[4723] | 47 |
|
---|
[4770] | 48 |
|
---|
[6874] | 49 | #
|
---|
| 50 | # Build which are normally built.
|
---|
| 51 | #
|
---|
| 52 | BLDDIRS = src tools\install
|
---|
| 53 | ALL_DIRS = include lib src tools
|
---|
[4723] | 54 |
|
---|
| 55 |
|
---|
[6874] | 56 | #
|
---|
| 57 | # The ordinary rules.
|
---|
| 58 | #
|
---|
| 59 | all: odin_libraries needed
|
---|
| 60 | @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) all
|
---|
[4723] | 61 |
|
---|
[6874] | 62 | clean nothing:
|
---|
| 63 | @$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) $@
|
---|
[4723] | 64 |
|
---|
[6874] | 65 | libs: lib
|
---|
| 66 | lib dep: needed
|
---|
| 67 | @$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) $@
|
---|
| 68 |
|
---|
[7996] | 69 | cleanall:
|
---|
| 70 | SET CCENV=VAC3
|
---|
[9876] | 71 | -@$(DODIRS) "$(ALL_DIRS)" $(MAKE_CMD) NODEP=1 cleanall
|
---|
| 72 | rm -Rf bin\Debug* bin\Release\* bin\Profile*
|
---|
| 73 |
|
---|
[6874] | 74 |
|
---|
| 75 | #
|
---|
| 76 | # Special build mode rules.
|
---|
| 77 | #
|
---|
[7994] | 78 | debug: odin_libraries_debug needed
|
---|
[6874] | 79 | @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) DEBUG=1 all
|
---|
| 80 |
|
---|
[7994] | 81 | debugsmp: odin_libraries_debug needed
|
---|
[6874] | 82 | @$(DODIRS) "src" $(MAKE_CMD) DEBUG=1 smp
|
---|
| 83 | @$(DODIRS) "tools\install" $(MAKE_CMD) DEBUG=1 all
|
---|
| 84 |
|
---|
[7994] | 85 | nodebuginfo: odin_libraries_debug needed
|
---|
[6874] | 86 | @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) DEBUG=1 NODEBUGINFO=1 all
|
---|
| 87 |
|
---|
[7994] | 88 | nodebuginfosmp: odin_libraries_debug needed
|
---|
[6874] | 89 | @$(DODIRS) "src" $(MAKE_CMD) DEBUG=1 NODEBUGINFO=1 smp
|
---|
| 90 | @$(DODIRS) "tools\install" $(MAKE_CMD) DEBUG=1 NODEBUGINFO=1 all
|
---|
| 91 |
|
---|
[7994] | 92 | profile: odin_libraries_profile needed
|
---|
[7505] | 93 | SET PROFILEHOOKS=1
|
---|
[6874] | 94 | @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) DEBUG=1 PROFILE=1 all
|
---|
[7994] | 95 | SET PROFILEHOOKS=
|
---|
[6874] | 96 |
|
---|
[7994] | 97 | profilesmp: odin_libraries_profile needed
|
---|
| 98 | SET PROFILEHOOKS=1
|
---|
[6874] | 99 | @$(DODIRS) "src" $(MAKE_CMD) DEBUG=1 PROFILE=1 smp
|
---|
| 100 | @$(DODIRS) "tools\install" $(MAKE_CMD) DEBUG=1 PROFILE=1 all
|
---|
[7994] | 101 | SET PROFILEHOOKS=
|
---|
[6874] | 102 |
|
---|
[7994] | 103 | release: odin_libraries_release needed
|
---|
[4723] | 104 | SET DEBUG=
|
---|
[6874] | 105 | @$(DODIRS) "$(BLDDIRS)" $(MAKE_CMD) all
|
---|
[4723] | 106 |
|
---|
[7994] | 107 | releasesmp: odin_libraries_release needed
|
---|
[4723] | 108 | SET DEBUG=
|
---|
[6874] | 109 | @$(DODIRS) "src" $(MAKE_CMD) smp
|
---|
| 110 | @$(DODIRS) "tools\install" $(MAKE_CMD) all
|
---|
[4723] | 111 |
|
---|
| 112 |
|
---|
[6874] | 113 | #
|
---|
| 114 | # Common rules.
|
---|
| 115 | #
|
---|
[4723] | 116 | odin_libraries:
|
---|
[6874] | 117 | @$(DODIRS) "lib" $(MAKE_CMD)
|
---|
[4723] | 118 |
|
---|
[7994] | 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 |
|
---|
[6874] | 129 | needed_tools: needed
|
---|
| 130 | needed:
|
---|
| 131 | @$(DODIRS) "tools" $(MAKE_CMD) $@
|
---|
[4723] | 132 |
|
---|
[10312] | 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 |
|
---|