| 1 | # $Id: makefile,v 1.20 2002-02-23 23:47:08 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 DEBUG=
 | 
|---|
| 71 |     SET CCENV=VAC3
 | 
|---|
| 72 |     -@$(DODIRS) "$(ALL_DIRS)"    $(MAKE_CMD)           clean
 | 
|---|
| 73 |     -@$(DODIRS) "$(ALL_DIRS)"    $(MAKE_CMD) DEBUG=1   clean
 | 
|---|
| 74 |     -@$(DODIRS) "$(ALL_DIRS)"    $(MAKE_CMD) PROFILE=1 clean
 | 
|---|
| 75 |     SET CCENV=VAC36
 | 
|---|
| 76 |     -@$(DODIRS) "$(ALL_DIRS)"    $(MAKE_CMD)           clean
 | 
|---|
| 77 |     -@$(DODIRS) "$(ALL_DIRS)"    $(MAKE_CMD) DEBUG=1   clean
 | 
|---|
| 78 |     -@$(DODIRS) "$(ALL_DIRS)"    $(MAKE_CMD) PROFILE=1 clean
 | 
|---|
| 79 |     SET CCENV=WAT
 | 
|---|
| 80 |     -@$(DODIRS) "$(ALL_DIRS)"    $(MAKE_CMD)           clean
 | 
|---|
| 81 |     -@$(DODIRS) "$(ALL_DIRS)"    $(MAKE_CMD) DEBUG=1   clean
 | 
|---|
| 82 |     -@$(DODIRS) "$(ALL_DIRS)"    $(MAKE_CMD) PROFILE=1 clean
 | 
|---|
| 83 | 
 | 
|---|
| 84 | 
 | 
|---|
| 85 | #
 | 
|---|
| 86 | # Special build mode rules.
 | 
|---|
| 87 | #
 | 
|---|
| 88 | debug:          odin_libraries_debug   needed
 | 
|---|
| 89 |     @$(DODIRS) "$(BLDDIRS)"     $(MAKE_CMD) DEBUG=1 all
 | 
|---|
| 90 | 
 | 
|---|
| 91 | debugsmp:       odin_libraries_debug   needed
 | 
|---|
| 92 |     @$(DODIRS) "src"            $(MAKE_CMD) DEBUG=1 smp
 | 
|---|
| 93 |     @$(DODIRS) "tools\install"  $(MAKE_CMD) DEBUG=1 all
 | 
|---|
| 94 | 
 | 
|---|
| 95 | nodebuginfo:    odin_libraries_debug   needed
 | 
|---|
| 96 |     @$(DODIRS) "$(BLDDIRS)"     $(MAKE_CMD) DEBUG=1 NODEBUGINFO=1 all
 | 
|---|
| 97 | 
 | 
|---|
| 98 | nodebuginfosmp: odin_libraries_debug   needed
 | 
|---|
| 99 |     @$(DODIRS) "src"            $(MAKE_CMD) DEBUG=1 NODEBUGINFO=1 smp
 | 
|---|
| 100 |     @$(DODIRS) "tools\install"  $(MAKE_CMD) DEBUG=1 NODEBUGINFO=1 all
 | 
|---|
| 101 | 
 | 
|---|
| 102 | profile:        odin_libraries_profile needed
 | 
|---|
| 103 |     SET PROFILEHOOKS=1
 | 
|---|
| 104 |     @$(DODIRS) "$(BLDDIRS)"     $(MAKE_CMD) DEBUG=1 PROFILE=1 all
 | 
|---|
| 105 |     SET PROFILEHOOKS=
 | 
|---|
| 106 | 
 | 
|---|
| 107 | profilesmp:     odin_libraries_profile needed
 | 
|---|
| 108 |     SET PROFILEHOOKS=1
 | 
|---|
| 109 |     @$(DODIRS) "src"            $(MAKE_CMD) DEBUG=1 PROFILE=1 smp
 | 
|---|
| 110 |     @$(DODIRS) "tools\install"  $(MAKE_CMD) DEBUG=1 PROFILE=1 all
 | 
|---|
| 111 |     SET PROFILEHOOKS=
 | 
|---|
| 112 | 
 | 
|---|
| 113 | release:        odin_libraries_release needed
 | 
|---|
| 114 |     SET DEBUG=
 | 
|---|
| 115 |     @$(DODIRS) "$(BLDDIRS)"     $(MAKE_CMD) all
 | 
|---|
| 116 | 
 | 
|---|
| 117 | releasesmp:     odin_libraries_release needed
 | 
|---|
| 118 |     SET DEBUG=
 | 
|---|
| 119 |     @$(DODIRS) "src"            $(MAKE_CMD) smp
 | 
|---|
| 120 |     @$(DODIRS) "tools\install"  $(MAKE_CMD) all
 | 
|---|
| 121 | 
 | 
|---|
| 122 | 
 | 
|---|
| 123 | #
 | 
|---|
| 124 | # Common rules.
 | 
|---|
| 125 | #
 | 
|---|
| 126 | odin_libraries:
 | 
|---|
| 127 |     @$(DODIRS) "lib"            $(MAKE_CMD)
 | 
|---|
| 128 | 
 | 
|---|
| 129 | odin_libraries_debug:
 | 
|---|
| 130 |     @$(DODIRS) "lib"            $(MAKE_CMD) DEBUG=1
 | 
|---|
| 131 | 
 | 
|---|
| 132 | odin_libraries_profile:
 | 
|---|
| 133 |     @$(DODIRS) "lib"            $(MAKE_CMD) PROFILE=1
 | 
|---|
| 134 | 
 | 
|---|
| 135 | odin_libraries_release:
 | 
|---|
| 136 |     SET DEBUG=
 | 
|---|
| 137 |     @$(DODIRS) "lib"            $(MAKE_CMD)
 | 
|---|
| 138 | 
 | 
|---|
| 139 | needed_tools: needed
 | 
|---|
| 140 | needed:
 | 
|---|
| 141 |     @$(DODIRS) "tools"          $(MAKE_CMD) $@
 | 
|---|
| 142 | 
 | 
|---|