[1720] | 1 | # Central makefile for building the OS2/GCC C runtime
|
---|
| 2 | #
|
---|
| 3 | # InnoTek Systemberatung GmbH
|
---|
| 4 | #
|
---|
| 5 | # Copyright (c) 1994-1995 by Eberhard Mattes
|
---|
| 6 | # Copyright (c) 2003 InnoTek Systemberatung GmbH
|
---|
| 7 | #
|
---|
| 8 | # Author: Andrew Zabolotny <zap@cobra.ru>
|
---|
| 9 | # $Id: Makefile.gmk 3842 2014-03-16 19:46:21Z bird $
|
---|
| 10 | #
|
---|
| 11 | # All Rights Reserved
|
---|
| 12 | #
|
---|
| 13 | # Requires GNU Make.
|
---|
| 14 | # In fact, this build system could be entitled "GNU Make Unleashed"
|
---|
| 15 | #
|
---|
| 16 | # For a brief description of how build system works please read build.txt
|
---|
| 17 | #
|
---|
| 18 | # Bootstrapping sequence using EMX gcc compiler:
|
---|
| 19 | #
|
---|
| 20 | # 1. Backup include/ctype.h and rename include/ctype.h-bootstrap to
|
---|
| 21 | # include/ctype.h
|
---|
| 22 | # 2. Run 'make os2', put the resulting library os2.a to emx/lib as _os2.a,
|
---|
| 23 | # and convert it to .lib with emxomf: 'emxomf _os2.a'
|
---|
| 24 | # 3. Now compile everything you wish this way: 'make LIBS=-l_os2'
|
---|
| 25 | #
|
---|
| 26 |
|
---|
| 27 | # Build type control variables. You can set them right from command line,
|
---|
| 28 | # e.g "make MODE=dbg"
|
---|
| 29 |
|
---|
| 30 | # Build mode: opt (optimization), dbg (debug)
|
---|
| 31 | MODE = dbg
|
---|
| 32 | # Base output directory
|
---|
| 33 | OUT = out/
|
---|
| 34 | # Base installation directory
|
---|
| 35 | INS = out/$(MODE)/install/
|
---|
| 36 | # CPU type (pretend we are portable ;-)
|
---|
| 37 | CPU = 386
|
---|
| 38 | # Name of this makefile
|
---|
| 39 | ifndef MAKEFILE
|
---|
[2897] | 40 | MAKEFILE = Makefile.gmk
|
---|
[1720] | 41 | endif
|
---|
| 42 |
|
---|
| 43 | # Actual output directory (referenced with $.)
|
---|
| 44 | . = $(OUT)$(MODE)/
|
---|
| 45 |
|
---|
| 46 | # overrides from the environment.
|
---|
| 47 | ifdef PATH_OBJ
|
---|
| 48 | ifndef PATH_OBJD
|
---|
| 49 | PATH_OBJD := $(shell echo $(PATH_OBJ)|sed 's/^[a-zA-Z]://')
|
---|
| 50 | endif
|
---|
| 51 | OUT = $(PATH_OBJD)/emx/
|
---|
[1941] | 52 | INS = $(PATH_OBJD)/builtunix/usr/
|
---|
[1720] | 53 | . = $(OUT)
|
---|
| 54 | endif
|
---|
| 55 |
|
---|
| 56 | ifdef BUILD_MODE
|
---|
| 57 | ifeq ($(BUILD_MODE),RELEASE)
|
---|
| 58 | MODE = opt
|
---|
| 59 | endif
|
---|
| 60 | endif
|
---|
| 61 |
|
---|
| 62 | # Check if MODE has a valid value
|
---|
| 63 | ifneq ($(filter-out /opt/ /dbg/ /prf/,/$(MODE)/),)
|
---|
| 64 | $(error MODE should have one of the following values: opt, dbg, prf)
|
---|
| 65 | endif
|
---|
| 66 |
|
---|
| 67 | # The object file format to use for tools (emxomf, ld and friends)
|
---|
| 68 | TOOLFMT.dbg = omf
|
---|
| 69 | TOOLFMT.opt = omf
|
---|
| 70 | TOOLFMT.prf = omf
|
---|
| 71 | TOOLFMT = $(TOOLFMT.$(MODE))
|
---|
| 72 |
|
---|
| 73 | # Use ash.exe which is quite fast (comparable to cmd.exe) but has more features
|
---|
| 74 | SHELL := ash.exe
|
---|
| 75 |
|
---|
| 76 | # Source base directory.
|
---|
| 77 | srcdir := $(shell pwd)
|
---|
[2897] | 78 |
|
---|
[1720] | 79 | # File name extensions
|
---|
| 80 | # Executable files -- xxx$E
|
---|
| 81 | E = .exe
|
---|
| 82 | # DLL files --- xxx$D
|
---|
| 83 | D = .dll
|
---|
| 84 | # Library files --- xxx$A
|
---|
| 85 | A = .$(if $(findstring omf,$(.TKIND)),lib,a)
|
---|
| 86 |
|
---|
| 87 | # Use the tool we built.
|
---|
| 88 | GETTOOL ?= $.$(TOOLFMT)/$1$E
|
---|
| 89 | # Use the tool we built if present
|
---|
| 90 | GETTOOL2 ?= `test -f '$.$(TOOLFMT)/$1$E' && echo '$.$(TOOLFMT)/'`$1$E
|
---|
| 91 |
|
---|
| 92 | # The C compiler
|
---|
| 93 | CC = gcc -c -Zmt -fmessage-length=0
|
---|
| 94 | # The C compiler flags
|
---|
| 95 | ifndef NO_LOCAL_HEADERS
|
---|
| 96 | CFLAGS.INC += -Iinclude
|
---|
| 97 | endif
|
---|
| 98 | CFLAGS.INC += -Isrc/include
|
---|
[2117] | 99 | CFLAGS.INC += -Isrc/lib/bsd/include
|
---|
[1720] | 100 | CFLAGS = -Wall -Wundef -Wmissing-prototypes -mstack-arg-probe $(CFLAGS.INC) $(CFLAGS.$(MODE)) $(CFLAGS.KIND)
|
---|
| 101 | # The additional C compiler flags for different build modes
|
---|
[2117] | 102 | CFLAGS.opt = -g -O3 -mcpu=pentium -mpreferred-stack-boundary=4 -malign-strings=2 -falign-loops=2 -falign-jumps=2 -falign-functions=3
|
---|
[1720] | 103 | CFLAGS.dbg = -g -DDEBUG
|
---|
| 104 | CFLAGS.prf = $(CFLAGS.opt) -pg
|
---|
| 105 | CFLAGS.aout = -Zaout
|
---|
| 106 | CFLAGS.omf = -Zomf
|
---|
| 107 | CFLAGS.prof = -pg
|
---|
| 108 | CFLAGS.log = -DDEBUG_LOGGING -D__LIBC_STRICT
|
---|
| 109 | # The object files are put in subdirectory objectformat-targetkind,
|
---|
| 110 | # we decompose object file name back and pick appropiate $CFLAGS
|
---|
| 111 | CFLAGS.KIND = $(foreach x,$(subst -, ,$(firstword $(subst /, ,$(subst $.,,$@)))),$(CFLAGS.$x))
|
---|
| 112 | # How to compile a .c file
|
---|
| 113 | DO.COMPILE.c = $(CC) -std=gnu99 $(strip $(CFLAGS) $1) -o $@ $(srcdir)/$< -I$(dir $<)
|
---|
| 114 | # '-std=gnu99' doesn't work with '-x assembler-with-cpp', therefor no $(call DO.COMPILE.c).
|
---|
| 115 | DO.COMPILE.s = $(CC) -x assembler-with-cpp $(strip $(CFLAGS) $1) -o $@ $(srcdir)/$< -I$(dir $<)
|
---|
| 116 |
|
---|
| 117 | # The linker
|
---|
| 118 | LD = gcc
|
---|
| 119 | # Linker flags
|
---|
| 120 | LDFLAGS = $(LDFLAGS.$(MODE)) $(LDFLAGS.KIND) -Zmap -Zstack 1024 -Zhigh-mem $(LIBS)
|
---|
| 121 | LDFLAGS.DLL = $(LDFLAGS) -Zdll -Zfork
|
---|
| 122 | # Linker flags for different build modes
|
---|
| 123 | LDFLAGS.opt = -g -Zcrtdll=c_dll
|
---|
| 124 | LDFLAGS.prf = -g -Zcrtdll=c_dll -lkProfile -LG:/kTaskMgr/Tree/lib/debug
|
---|
| 125 | LDFLAGS.dbg = -g
|
---|
| 126 | LDFLAGS.aout = -Zaout
|
---|
[2815] | 127 | ifeq ($(EMXOMFLD_TYPE),wlink)
|
---|
| 128 | LDFLAGS.omf = -Zomf
|
---|
| 129 | else
|
---|
[1720] | 130 | LDFLAGS.omf = -Zomf -Zlinker /PM:VIO -Zlinker /LINENUMBERS
|
---|
[2815] | 131 | endif
|
---|
[1720] | 132 | LDFLAGS.prof = -pg
|
---|
| 133 | # Linker flags for different kinds of target
|
---|
| 134 | LDFLAGS.KIND = $(foreach x,$(subst -, ,$(firstword $(subst /, ,$(subst $.,,$@)))),$(LDFLAGS.$x))
|
---|
| 135 | # How to link a .exe file
|
---|
| 136 | DO.LINK.exe = $(LD) $(strip $(LDFLAGS) $(filter-out -l%,$1)) -o $@ $(^O) $(^DEF) $(^LIB) $(filter -l%,$1)
|
---|
| 137 | # How to link a .dll file
|
---|
| 138 | DO.LINK.dll = $(LD) $(strip $(LDFLAGS.DLL) $(filter-out -l%,$1)) -o $@ $(^O) $(^DEF) $(^LIB) $(filter -l%,$1)
|
---|
| 139 |
|
---|
| 140 | # Pack executables and DLLs right after they are linked
|
---|
| 141 | # bird: I don't care about space, only performance. So, we will only use
|
---|
| 142 | # lxlite for stripping and sector aligning.
|
---|
| 143 | # <rant> My explanation is that anything which is used frequently
|
---|
| 144 | # enough will be in one of the caches, so unpacking the datasegment
|
---|
| 145 | # for each new process is a waste of time. The code segment is
|
---|
| 146 | # shared, data segment is not shared, but must be reloaded page by page
|
---|
| 147 | # from the executable in new processes.
|
---|
| 148 | # For further optimzations, we align pages on 4kb boundaries since this
|
---|
| 149 | # is the JFS block size and thus should be most the efficient unit to read. </rant>
|
---|
| 150 | # URG! we must not do this for ldstub.bin!
|
---|
| 151 | ifeq ($(MODE),opt)
|
---|
| 152 | LXLITE.FLAGS = /F+ /AP:4096 /MRN /MLN /MF1
|
---|
| 153 | DO.LINK.exe += $(if $(findstring .exe,$@), $(NL)cp $@ $(basename $@).dbg $(NL)lxlite /X /AS $(subst /,\\,$@))
|
---|
| 154 | DO.LINK.dll += $(NL)cp $@ $(basename $@).dbg $(NL)lxlite $(LXLITE.FLAGS) $(subst /,\\,$@)
|
---|
| 155 | endif
|
---|
| 156 |
|
---|
| 157 | # emxbind tool
|
---|
| 158 | EMXBIND = $(call GETTOOL2,emxbind)
|
---|
| 159 | # emxbind flags
|
---|
| 160 | EMXBINDFLAGS = -bq $(EMXBINDFLAGS.$(MODE))
|
---|
| 161 | EMXBINDFLAGS.opt = -s
|
---|
| 162 | EMXBINDFLAGS.prf =
|
---|
| 163 | EMXBINDFLAGS.dbg =
|
---|
| 164 | # Flags for emxbind
|
---|
| 165 | DO.EMXBIND = $(EMXBIND) $(EMXBINDFLAGS) -o $@ $1
|
---|
| 166 |
|
---|
| 167 | # The macro assembler
|
---|
| 168 | ifdef PATH_TOP
|
---|
| 169 | ASM = $(PATH_TOP)/tools/x86.os2/masm/v6.0/binp/ml.exe -c
|
---|
| 170 | else
|
---|
| 171 | ASM = ml -c
|
---|
| 172 | endif
|
---|
| 173 | ASMFLAGS = -Cp -W3 -WX -VM -nologo
|
---|
| 174 | # How to compile an .asm file
|
---|
| 175 | DO.COMPILE.asm = $(ASM) $(ASMFLAGS) $1 -Fo$@ $<
|
---|
| 176 |
|
---|
| 177 | # The tool to create an archive
|
---|
| 178 | AR = $(if $(findstring .lib,$@), $(call GETTOOL2,emxomfar),ar)
|
---|
| 179 | ARFLAGS = crs
|
---|
[3099] | 180 | DO.LIBRARY = $(call RM_SHELL,$@); $(AR) $(ARFLAGS)$1 $@ $(^O)
|
---|
[1720] | 181 |
|
---|
| 182 | # The tool to extract exports from object files and archives,
|
---|
| 183 | # removing unused stuff (like empty lines and comments)
|
---|
| 184 | # and sorting alphabetically (looks nicer).
|
---|
| 185 | EMXEXP = $(call GETTOOL2,emxexp)
|
---|
| 186 | EMXEXPFLAGS = -u
|
---|
| 187 | DO.EMXEXP = $(EMXEXP) $(strip $(EMXEXPFLAGS) $1) | sed -e "/^$$/d" -e "/^ *;/d" | sort -d >>$2
|
---|
| 188 |
|
---|
| 189 | # The tool to create import libraries
|
---|
| 190 | IMPLIB = $(call GETTOOL2,emximp)
|
---|
| 191 | IMPLIBFLAGS.prof = -m
|
---|
| 192 | IMPLIBFLAGS.lazy = -l
|
---|
| 193 | IMPLIBFLAGS.KIND = $(foreach x,$(subst -, ,$(firstword $(subst /, ,$(subst $.,,$@)))),$(IMPLIBFLAGS.$x))
|
---|
| 194 | DO.IMPLIB = $(IMPLIB) -o $@ $(strip $1 $(IMPLIBFLAGS.KIND)) $(^IC)\
|
---|
| 195 | $(if $(^ID),\
|
---|
| 196 | $(NL)$(IMPLIB) -o $@.data$(suffix $@) $(strip $1) $(^ID)\
|
---|
| 197 | $(NL)$(call RMDIR,$@.tmpdir)\
|
---|
| 198 | $(NL)$(call MKDIR,$@.tmpdir)\
|
---|
| 199 | $(NL)cd $@.tmpdir && $(AR) x ../$(notdir $@.data$(suffix $@))\
|
---|
[2287] | 200 | $(NL)$(call RM,$@.tmpdir/*.log*)\
|
---|
[1720] | 201 | $(NL)$(AR) rs $@ $@.tmpdir/* )\
|
---|
| 202 | $(if $(^O)$(^LIB),$(NL)$(AR) rs $@ $(^O) $(^LIB))
|
---|
| 203 |
|
---|
| 204 | # How to create dependencies
|
---|
| 205 | MAKEDEP = makedep
|
---|
| 206 | MAKEDEPFLAGS = $(CFLAGS.INC)
|
---|
| 207 | DO.DEPS = $(MAKEDEP) $(MAKEDEPFLAGS) \
|
---|
| 208 | -I$(subst $(SPACE), -I,$(sort $(dir $^))) -I$. -p$(@D)/ -c -S -f$@ $^
|
---|
| 209 |
|
---|
| 210 | # How to convert an a.out file to the OMF format
|
---|
| 211 | # Emxomf depends on two libs, we have to detect wethere or not emxomf is built
|
---|
| 212 | # or not. Unfortunately make isn't up to the job of figuring this out, so we
|
---|
| 213 | # must use the shell.
|
---|
| 214 | EMXOMF = $(call GETTOOL2,emxomf)
|
---|
| 215 | DO.EMXOMF = $(EMXOMF) $(strip $1 -o) $@ $(if $<,$<, $(subst /omf-prof/,/aout-prof/,$(subst /omf-log/,/aout-log/,$(subst /omf/,/aout/,$(@:.obj=.o)))) )
|
---|
| 216 |
|
---|
| 217 | # How to copy some file to installation directory
|
---|
| 218 | # In optimize mode we have to strip the libraries after copying
|
---|
| 219 | INSTALL=$(call CP,$1,$2)
|
---|
| 220 | ifeq ($(MODE),opt)
|
---|
| 221 | INSTALL += $(if $(filter-out %.a,$2),$(NL)strip --strip-debug $2)
|
---|
| 222 | INSTALL += $(if $(filter-out %.lib,$2),$(NL)emxomf -s $2)
|
---|
| 223 | endif
|
---|
| 224 |
|
---|
| 225 | # How to filter just the object files from $^
|
---|
| 226 | ^O = $(filter %.o,$^)
|
---|
| 227 | # Just the .imp files from $^ excluing -data.imp files.
|
---|
| 228 | ^IC = $(filter-out %-data.imp,$(filter %.imp,$^))
|
---|
| 229 | # Just the -data.imp files from $^
|
---|
| 230 | ^ID = $(filter %-data.imp,$^)
|
---|
| 231 | # How to filter just the .def files from $^
|
---|
| 232 | ^DEF = $(filter %.def,$^)
|
---|
| 233 | # How to filter the libraries from $^
|
---|
| 234 | ^LIB = $(strip $(filter %.a,$^) $(filter %.lib,$^))
|
---|
| 235 |
|
---|
| 236 | # A newline
|
---|
| 237 | define NL
|
---|
| 238 |
|
---|
| 239 |
|
---|
| 240 | endef
|
---|
| 241 | # Opening and closing brackets (for use inside variable expansions)
|
---|
| 242 | OB := (
|
---|
| 243 | CB := )
|
---|
| 244 | COMMA := ,
|
---|
| 245 | SPACE := $(EMPTY) $(EMPTY)
|
---|
| 246 | # Text output separator (cannot begin with '-', echo thinks its a switch)
|
---|
| 247 | SEP := ==========================================================================
|
---|
| 248 |
|
---|
| 249 | # How to remove one or more files without questions
|
---|
[3099] | 250 | ifdef KMK_VERSION
|
---|
| 251 | RM = kmk_builtin_rm -f $1
|
---|
| 252 | else
|
---|
[1720] | 253 | RM = rm -f $1
|
---|
[3099] | 254 | endif
|
---|
| 255 | RM_SHELL = rm -f $1
|
---|
[1720] | 256 | # How to remove one or more directories without questions
|
---|
| 257 | RMDIR = rm -rf $1
|
---|
| 258 | # How to copy several files to a directory
|
---|
[3099] | 259 | ifdef KMK_VERSION
|
---|
| 260 | CP = kmk_builtin_cp $1 $2
|
---|
| 261 | else
|
---|
[1720] | 262 | CP = cp $1 $2
|
---|
[3099] | 263 | endif
|
---|
[1720] | 264 | # Miscelaneous tools
|
---|
[3099] | 265 | ifdef KMK_VERSION
|
---|
| 266 | MKDIR = kmk_builtin_mkdir -p $1
|
---|
| 267 | else
|
---|
[1720] | 268 | MKDIR = mkdir.exe -p $1
|
---|
[3099] | 269 | endif
|
---|
[1720] | 270 | # How to update a file only if it has been changed
|
---|
| 271 | UPDATE = (cmp -s $1 $2 || mv -f $1 $2) && rm -f $1
|
---|
| 272 | # How to touch a file
|
---|
| 273 | TOUCH = touch $1
|
---|
| 274 | # Re-build the original string including the ',' between args. Also escape
|
---|
| 275 | # dollars since otherwise ash would expand them.
|
---|
| 276 | ECHOIZE = $(subst $$,\$$,$1$(strip $(subst $(SPACE)$(COMMA),$(COMMA),$(foreach x,2 3 4 5 6 7 8 9,$(if $($x),$(COMMA) $($x))))))
|
---|
| 277 | # How to output a text string (with appended newline)
|
---|
[3099] | 278 | ifdef KMK_VERSION
|
---|
| 279 | ECHO = kmk_builtin_echo "$(call ECHOIZE,$1,$2,$3,$4,$5,$6,$7,$8,$9)"
|
---|
| 280 | else
|
---|
[1720] | 281 | ECHO = echo "$(call ECHOIZE,$1,$2,$3,$4,$5,$6,$7,$8,$9)"
|
---|
[3099] | 282 | endif
|
---|
[1720] | 283 | # Same but append the text to a file (given with first argument)
|
---|
| 284 | FECHO = echo "$(call ECHOIZE,$2,$3,$4,$5,$6,$7,$8,$9)" >> "$1"
|
---|
| 285 | # How to replace the source file extension with a .o extension
|
---|
[2011] | 286 | OBJEXT = $(patsubst %.S,%.o,$(patsubst %.s,%.o,$(patsubst %.asm,%.o,$(patsubst %.c,%.o,$1))))
|
---|
[1720] | 287 | # Compute object file path given source file path (except the $. prefix)
|
---|
| 288 | OBJFILE = $(addprefix $(.TKIND.DIR),$(call OBJEXT,$1))
|
---|
| 289 |
|
---|
| 290 | #------------ Variables appended by submakefiles ------------
|
---|
| 291 | # The list of available modules
|
---|
| 292 | MODULES :=
|
---|
| 293 | # The help text for module list
|
---|
| 294 | DO.HELP.MODULES :=
|
---|
| 295 | # The help about public makefile variables
|
---|
| 296 | DO.HELP.VARS := $(call ECHO, MODE={dbg|opt|prf} - choose between debug, optimized and profiled build modes.)$(NL)
|
---|
| 297 | DO.HELP.VARS += $(call ECHO, OBJF={omf|aout} - build object files in omf or a.out format.)$(NL)
|
---|
| 298 | # The list of work directories needeed for building all targets
|
---|
| 299 | TARGDIRS :=
|
---|
| 300 | # Build rules (_@_ replaced by name of generated makefile)
|
---|
| 301 | RULES :=
|
---|
| 302 | # The list of dependency files
|
---|
| 303 | TARGDEPEND :=
|
---|
| 304 | # The list of installed files
|
---|
| 305 | INS.FILES :=
|
---|
| 306 |
|
---|
| 307 | .PHONY: default help all libs tools clean install install cleandep \
|
---|
| 308 | cleandepend dep depend depdone
|
---|
| 309 | .SUFFIXES:
|
---|
[2011] | 310 | .SUFFIXES: .c .cpp .asm .s .S .o .exe .dll .a .lib .obj
|
---|
[1720] | 311 |
|
---|
| 312 | # Default target
|
---|
| 313 | default: help
|
---|
| 314 |
|
---|
| 315 | #------------ Submakefiles ------------
|
---|
| 316 | ifndef SUBMAK
|
---|
| 317 | SUBMAK := version.smak $(wildcard src/*/*.smak) include/include.smak $(wildcard bsd/*/*.smak) $(wildcard gnu/*/*.smak)
|
---|
| 318 | endif
|
---|
| 319 |
|
---|
| 320 | # include template rules
|
---|
| 321 | include templates.smak
|
---|
| 322 |
|
---|
| 323 | # Include all submakefiles
|
---|
| 324 | -include $(SUBMAK)
|
---|
| 325 |
|
---|
[2457] | 326 | ifdef OFFICIAL_BIRD_VERSION
|
---|
[3842] | 327 | ifneq ($(filter-out eniac delirium os2bld, $(HOSTNAME)),)
|
---|
[2452] | 328 | $(error yea, nice try! Now go be ashamed of yourself!)
|
---|
| 329 | endif
|
---|
| 330 | endif
|
---|
[2897] | 331 |
|
---|
[1720] | 332 | # Sort and remove duplicate directories
|
---|
| 333 | TARGDIRS := $(sort $(TARGDIRS))
|
---|
| 334 | # Find out which directories are needed for installation
|
---|
| 335 | INSDIRS := $(sort $(dir $(INS.FILES)))
|
---|
| 336 |
|
---|
| 337 | #------------ Global targets ------------
|
---|
| 338 | help:
|
---|
| 339 | @$(call ECHO,$(SEP))
|
---|
| 340 | @$(call ECHO,Welcome to $(PACKAGE) version $(VERSION) build system!)
|
---|
| 341 | @$(call ECHO,$(COPYRIGHT))
|
---|
| 342 | @$(call ECHO,To build something, type 'make {target} {vars}', where {target} is one of:)
|
---|
| 343 | @$(call ECHO, all - build all available modules)
|
---|
| 344 | @$(call ECHO, {module-name} - build just a particular module)
|
---|
| 345 | @$(call ECHO, tools - build just the tools)
|
---|
| 346 | @$(call ECHO, libs - build all libraries)
|
---|
| 347 | @$(call ECHO, clean - remove all generated files (remove all built files))
|
---|
| 348 | @$(call ECHO, install - generate a installation tree in $(INS))
|
---|
| 349 | @$(call ECHO, dep - generate dependency files for all changed targets)
|
---|
| 350 | @$(call ECHO, cleandep - remove all dependency file)
|
---|
| 351 | @$(call ECHO,$(SEP))
|
---|
| 352 | @$(call ECHO,There are a number of variables than can be set in the make)
|
---|
| 353 | @$(call ECHO,command line to control various aspects of compilation:)
|
---|
| 354 | @$(DO.HELP.VARS)
|
---|
| 355 | @$(call ECHO,$(SEP))
|
---|
| 356 | @$(call ECHO,The following modules are included in this package:)
|
---|
| 357 | @$(DO.HELP.MODULES)
|
---|
| 358 | @$(call ECHO,$(SEP))
|
---|
| 359 |
|
---|
| 360 | all: $(MODULES)
|
---|
| 361 |
|
---|
| 362 | clean:
|
---|
| 363 | $(call RMDIR,$(OUT))
|
---|
| 364 |
|
---|
| 365 | cleandep cleandepend:
|
---|
| 366 | $(call RM,$(TARGDEPEND))
|
---|
| 367 |
|
---|
| 368 | dep depend:
|
---|
| 369 | @$(MAKE) -f $(MAKEFILE) --no-print-directory BUILD_DEPS=1 depdone
|
---|
| 370 |
|
---|
| 371 | depdone:
|
---|
| 372 | @$(call ECHO,Dependency files succesfully updated)
|
---|
| 373 |
|
---|
| 374 | install: all $(INSDIRS) $(INS.FILES)
|
---|
| 375 |
|
---|
| 376 | $. $(INSDIRS) $(TARGDIRS):
|
---|
| 377 | $(call MKDIR,$@)
|
---|
| 378 |
|
---|
| 379 | # bird: add rule for forcibly re-generating the rules.
|
---|
| 380 | rules:
|
---|
| 381 | @$(call ECHO,smak don't generate rules anylonger!)
|
---|
| 382 |
|
---|
| 383 | # The general a.out -> OMF conversion rules for object files
|
---|
[1896] | 384 | $.omf/%.obj:
|
---|
[1720] | 385 | $(call DO.EMXOMF)
|
---|
[2897] | 386 | $.omf-log/%.obj:
|
---|
[1720] | 387 | $(call DO.EMXOMF)
|
---|
[2897] | 388 | $.omf-prof/%.obj:
|
---|
[1720] | 389 | $(call DO.EMXOMF)
|
---|
| 390 |
|
---|
| 391 | # The general a.out -> OMF conversion rule for libraries
|
---|
| 392 | $.omf%.lib:
|
---|
[1896] | 393 | $(call MKDIR, $(dir $@))
|
---|
[1720] | 394 | $(call DO.EMXOMF)
|
---|
| 395 |
|
---|
| 396 | #
|
---|
| 397 | # Checkout rule
|
---|
[2897] | 398 | #
|
---|
[1720] | 399 | checkout update up:
|
---|
| 400 | cvs -q update -d -P 2>&1 | tee up.log
|
---|
| 401 |
|
---|
| 402 |
|
---|