4 # DROPS (Dresden Realtime OPerating System) Component
6 # Makefile-Include for compiling templates (prog.mk, lib.mk)
8 # Makefile-Include for binary and lib directories
9 # Definitions for building the Makefile.inc, building dependencies,
10 # compiler configuration.
12 # If SYSTEM is defined and we do not clean, we generate Makefile.inc. This file
13 # holds the dependencies of the targets. Is also contains the definitions of
14 # variables holding the objects of the related targets. In a multiple
15 # architecture makefile, Makefile.inc will be built in arch-specific subdirs,
16 # like the other components built.
18 # Most compiler- and linker-flag variables are defined in such a way that
19 # using them in the rule will expand all the target- and
20 # architecture-specific definitions.
22 # The relink-rule is defined in this file.
24 # The dependencies for compiling files are defined here, the dep-files are
25 # generated with names .(source-file).d for .c, .cc and .S-files.
27 # Clean-rules are defined here.
30 $(GENERAL_D_LOC): $(L4DIR)/mk/binary.inc $(L4DIR)/mk/modes.inc
32 # our default Makefile-name in the OBJ-Subdirs
33 BID_OBJ_Makefile ?= Makefile
35 ifeq ($(SYSTEM),) # if we have no system yet, build the subdirs
36 #################################################################
38 # we have NO system defined in $(SYSTEM), we are in the src/ dir
40 #################################################################
43 SYSTEMS ?= x86-l4f amd64-l4f arm-l4f ppc32-l4f
46 $(strip $(if $(DEPENDS_PKGS), \
47 $(strip $(foreach i,$(DEPENDS_PKGS), \
48 $(if $(strip $(wildcard $(L4DIR)/pkg/$(i)) \
49 $(wildcard $(OBJ_BASE)/pc/$(i).pc)),,$(i))))))
51 ifneq ($(BID_MISSING_PKGS),)
52 # clear SYSTEMS to prevent building anything
54 text := $(shell echo -e "\033[32mPackage dependencies missing: \033[1m$(BID_MISSING_PKGS)\033[22m; skipping directory '$(SRC_DIR)'.\033[0m")
55 $(if $(BID_FAIL_ON_MISSING),$(error $(text)), $(info $(text)))
58 # intersection with BUILD_SYSTEMS
60 # filter the systems from the local SYSTEMS variable ($2), that match
61 # the build-architecture.
62 # args: $(1) - build architecture (one from BUILD_SYSTEMS)
64 # 1. check, if both systems are the same (optionally reduced by the CPU)
65 # 2. check, if at least the arch matches (and optionally the cpu)
66 FILTER_SYSTEM = $(shell echo $(2)|$(AWKP) '\
67 BEGIN{m=s="$(1)";sub("_[^-]*","",m)}\
69 if(m==$$i||s==$$i){print s}else\
70 if(index(m,$$i)==1||index(s,$$i)==1)\
71 {t=s;sub("-.*","",t);print t}}}')
73 # print that system of the SYSTEMS variable that actually matched with
74 # $(BUILD_SYSTEMS) to the given system
75 # args: $(1) - build architecture (SYSTEM)
77 # + do nearly the same as in FILTER_SYSTEM, but additionally check if
78 # the resulting system matches $(1). If so, print the according pattern from
80 BID_ORIG_SYSTEM = $(shell echo $(2)|$(AWKP) '\
81 BEGIN{m=s="$(1)";sub("_[^-]*","",m)}\
83 if(m==$$i||s==$$i){if(s=="$(1)"){print $$i;exit}};\
84 if(index(m,$$i)==1||index(s,$$i)==1)\
85 {t=s;sub("-.*","",t);\
86 if(t=="$(1)"){print $$i;exit}}}}')
89 TARGET_SYSTEMS := $(sort $(foreach sys,$(sort \
90 $(shell echo $(BUILD_SYSTEMS)|$(SED) -e 's/_[^- ]*\(-\{0,1\}\)/\1/g')), \
91 $(call FILTER_SYSTEM,$(sys),$(SYSTEMS))))
93 TARGET_SYSTEMS := $(sort $(foreach sys,$(BUILD_SYSTEMS),\
94 $(call FILTER_SYSTEM,$(sys),$(SYSTEMS))))
97 DIR_FROM_SUB = $(firstword $(addprefix ../,$(patsubst /%,,$(1))) $(1))
98 SYSTEM_TO_ARCH = $(shell echo $(1)|$(SED) -e 's/[_-].*//')
99 SYSTEM_TO_CPU = $(shell echo $(1)|$(SED) -ne 's/[^-_]*_\([^-]*\).*/\1/p')
100 SYSTEM_TO_L4API = $(shell echo $(1)|$(SED) -ne 's/.*-\(.*\)/\1/p')
102 $(foreach sys,$(TARGET_SYSTEMS),$(OBJ_DIR)/OBJ-$(sys)/$(BID_OBJ_Makefile)):$(OBJ_DIR)/OBJ-%/$(BID_OBJ_Makefile):$(OBJ_DIR)/.general.d
103 @install -d $(dir $@)
104 @echo 'L4DIR=$(L4DIR_ABS)'>$@
105 @echo 'OBJ_BASE=$(OBJ_BASE)'>>$@
106 @echo 'OBJ_DIR=$(OBJ_DIR)'>>$@
107 @echo 'SRC_DIR=$(SRC_DIR)'>>$@
108 @echo 'PKGDIR=$(PKGDIR_ABS)'>>$@
109 @echo 'PKGDIR_ABS=$(PKGDIR_ABS)'>>$@
110 @echo 'PKGDIR_OBJ=$(PKGDIR_OBJ)'>>$@
111 @echo 'MAKECONFLOCAL=$(SRC_DIR)/Makeconf.local'>>$@
112 @echo 'OSYSTEM=$(call BID_ORIG_SYSTEM,$*,$(SYSTEMS))'>>$@
113 @echo 'SYSTEM=$*'>>$@
114 @echo 'ARCH=$(call SYSTEM_TO_ARCH,$*)'>>$@
115 @echo 'CPU=$(call SYSTEM_TO_CPU,$*)'>>$@
116 @echo 'L4API=$(call SYSTEM_TO_L4API,$*)'>>$@
117 @echo 'vpath %.c $(VPATH_SRC_BASE)'>>$@
118 @echo 'vpath %.cc $(VPATH_SRC_BASE)'>>$@
119 @echo 'vpath %.cpp $(VPATH_SRC_BASE)'>>$@
120 @echo 'vpath %.S $(VPATH_SRC_BASE)'>>$@
121 @echo 'vpath %.y $(VPATH_SRC_BASE)'>>$@
122 @echo 'vpath %.l $(VPATH_SRC_BASE)'>>$@
123 @echo 'vpath %.ld $(VPATH_SRC_BASE)'>>$@
124 @echo 'vpath %.dpe $(VPATH_SRC_BASE)'>>$@
125 @echo '.general.d: $(SRC_DIR)/$(if $(wildcard Make.rules),Make.rules,Makefile)'>>$@
126 @echo 'include $(SRC_DIR)/$(if $(wildcard Make.rules),Make.rules,Makefile)'>>$@
127 @echo 'include $$(L4DIR)/mk/$(ROLE)'>>$@
129 install relink scrub:: $(foreach arch,$(TARGET_SYSTEMS),\
130 $(OBJ_DIR)/OBJ-$(arch)/$(BID_OBJ_Makefile))
131 $(if $(TARGET_SYSTEMS), $(VERBOSE)set -e ; \
132 for d in $(TARGET_SYSTEMS) ; do \
133 PWD=$OBJ-$$d $(MAKE) -C $(OBJ_DIR)/OBJ-$$d -f $(BID_OBJ_Makefile) \
139 all:: $(foreach arch,$(TARGET_SYSTEMS), $(OBJ_DIR)/OBJ-$(arch))
140 .PHONY: $(foreach arch,$(TARGET_SYSTEMS), $(OBJ_DIR)/OBJ-$(arch))
141 $(foreach arch,$(TARGET_SYSTEMS), $(OBJ_DIR)/OBJ-$(arch)):%:%/$(BID_OBJ_Makefile) pre-obj
142 $(VERBOSE)PWD=$@ $(MAKE) $(PL_j) -C $@ -f $(BID_OBJ_Makefile)
145 foreach_objdir = $(if $(wildcard $(OBJ_DIR)/OBJ-*), $(VERBOSE)set -e ; \
146 for d in $(wildcard $(OBJ_DIR)/OBJ-*) ; do \
147 PWD=$$d $(MAKE) -C $$d -f $(BID_OBJ_Makefile) $(1); \
150 %.i %.s.i:: export DO_SHOW_RESULT_FILE=y
152 $(call foreach_objdir,$@)
155 $(call foreach_objdir,$@)
158 $(VERBOSE)$(RM) -r $(wildcard $(OBJ_DIR))
160 .PHONY: $(TARGET_SYSTEMS)
163 ###############################################################
165 # we have a system defined in $(SYSTEM), we are in an OBJ- dir
167 ###############################################################
172 $(call DISASM_CMD,$(if $(DABIN),$(DABIN),$<))
174 expand_libdir_noexc = $(foreach i,$(1),$(i)/noexc $(i))
175 expand_libdir_reentrant = $(foreach i,$(1),$(i)/r $(i))
177 ifneq ($(CONFIG_USE_DROPS_STDDIR),)
178 L4INCDIR ?= $(addprefix $(OBJ_BASE)/include/$(ARCH)/,$(L4API)) \
179 $(addprefix $(OBJ_BASE)/include/,$(L4API)) \
180 $(OBJ_BASE)/include/$(ARCH) \
181 $(OBJ_BASE)/include \
182 $(if $(USE_DICE),$(DICE_INCDIR),) \
183 $(addprefix $(DROPS_STDDIR)/include/$(ARCH)/,$(L4API)) \
184 $(addprefix $(DROPS_STDDIR)/include/,$(L4API)) \
185 $(DROPS_STDDIR)/include/$(ARCH) \
186 $(DROPS_STDDIR)/include
188 L4LIBDIR ?= $(addprefix $(OBJ_BASE)/lib/$(ARCH)_$(CPU)/,$(L4API)) \
189 $(OBJ_BASE)/lib/$(ARCH)_$(CPU) \
191 $(addprefix $(DROPS_STDDIR)/lib/$(ARCH)_$(CPU)/,$(L4API)) \
192 $(DROPS_STDDIR)/lib/$(ARCH)_$(CPU) \
197 L4INCDIR ?= $(addprefix $(OBJ_BASE)/include/$(ARCH)/,$(L4API)) \
198 $(addprefix $(OBJ_BASE)/include/,$(L4API)) \
199 $(OBJ_BASE)/include/$(ARCH) \
200 $(OBJ_BASE)/include \
201 $(if $(USE_DICE),$(DICE_INCDIR),)
203 L4LIBDIR ?= $(addprefix $(OBJ_BASE)/lib/$(ARCH)_$(CPU)/,$(L4API)) \
204 $(OBJ_BASE)/lib/$(ARCH)_$(CPU) \
208 L4LIBDIR_R-y = $(call expand_libdir_reentrant, $(L4LIBDIR))
209 L4LIBDIR_R-n = $(L4LIBDIR)
210 L4LIBDIR_NOEXC= $(call expand_libdir_noexc,$(L4LIBDIR_R-$(L4_MULTITHREADED)))
215 # There is a hierarchy on defining variables depending on the targets they
216 # refer to: Most standard-Make Variables are supported. This includes
217 # LDFLAGS - options for ld, defined in prog.mk and lib.mk
218 # CPPFLAGS - options for the c preprocessor, included in CFLAGS
219 # CFLAGS - options for the c compiler
220 # CXXFLAGS - options for the c++ compiler
221 # ASFLAGS - options for the assembler
223 # Addtitionally, the following varibales are supported:
224 # SRC_C, SRC_CC, SRC_S - .c, .cc, .S source files
225 # CRT0, CRTN - startup and finish code
226 # LIBS - additional libs to link (with -l), including paths (-L)
227 # IDL - interface definition files
228 # TARGET - targets to ge built
230 # These variables will be used for all operations with the corresponding
231 # file types. More specific description is possible by using variables with
232 # added specifications. These specifications include a referred element and
233 # the architecture, both optional but in this order, separated by
234 # underscores. The referred element for CPPFLAGS, CFLAGS, CXXFLAGS and
235 # ASFLAGS is the source file. For the other variables, it is one of the
236 # target files. The TARGET variable can only be postfixed by an
238 # The specific variables will be used for the target and the referred element
239 # given in the name, additionally to the more general ones.
241 # Example for a valid specifications:
242 # SRC_C_libxverbose.a = verbose.c - ar's verbose.o into libxverbose.a, but
243 # not in other libs in the TARGET var.
245 include $(L4DIR)/mk/modes.inc
247 # select the variable specified in $(1) from the current architecture and
248 # mode. Fall back to "all" architecture if no specific version exists.
249 BID_mode_var= $(if $($(1)_$(ARCH)_$(MODE)),$($(1)_$(ARCH)_$(MODE)),$($(1)_all_$(MODE)))
251 BID_SUPPORTED ?= $(call BID_mode_var,BID_SUPPORTED)
252 ifneq ($(BID_SUPPORTED),y)
253 $(error Mode "$(MODE)" is not supported for CPU architecture "$(ARCH)")
256 LIBCINCDIR ?= $(call BID_mode_var,LIBCINCDIR)
257 LIBCLIBDIR ?= $(call BID_mode_var,LIBCLIBDIR)
258 L4_LIBS ?= $(call BID_mode_var,L4_LIBS)
259 CRT0 ?= $(call BID_mode_var,CRT0)
260 CRTP ?= $(if $(filter $(CRT0_DEFAULT),$(CRT0)),$(CRTP_DEFAULT),$(CRT0))
261 CRTN ?= $(call BID_mode_var,CRTN)
262 LDSCRIPT ?= $(call BID_mode_var,LDSCRIPT)
263 LDFLAGS += $(call BID_mode_var,LDFLAGS)
264 REQUIRES_LIBS += $(REQUIRES_LIBS_$(ARCH)) $(call BID_mode_var,REQUIRES_LIBS)
266 # we do not need to put our FLAG-definitions into a special file if we can
267 # use the target to parameterize it and if it needs not to appear in the deps
268 #CRT0 = $(word 1, $(CRT0_$@_$(OSYSTEM)) $(CRT0_$@) $(CRT0_$(OSYSTEM)))
269 #CRTN = $(word 1, $(CRTN_$@_$(OSYSTEM)) $(CRTN_$@) $(CRTN_$(OSYSTEM)))
270 LIBS += $(strip $(LIBS_$(OSYSTEM)) $(LIBS_$@) $(LIBS_$@_$(OSYSTEM)))
271 LIBS += $(REQUIRES_LIBS_LIST)
273 LDFLAGS += $(strip $(LDFLAGS_$(OSYSTEM)) $(LDFLAGS_$@) $(LDFLAGS_$@_$(OSYSTEM)))
275 # ---------------------------------
279 # call pkg-config, returns __PKGCONFIG_FAILED__ if the call failed
281 # 2: parameters to pkg-config
282 # 3: list of packages
283 # use L4_BID_PKG_CONFIG because of export-defs, the function is copied
284 L4_BID_PKG_CONFIG = $(PKG_CONFIG)
285 BID_PKG_CONFIG = $(if $(strip $(3)), \
286 $(shell PKG_CONFIG_LIBDIR=$(1)/pc \
287 PKG_CONFIG_PATH= $(L4_BID_PKG_CONFIG) \
288 --define-variable=incdir=$(1)/include/contrib \
289 $(2) $(3) || echo __PKGCONFIG_FAILED__))
291 BID_PKG_CONFIG_FAILED = $(findstring __PKGCONFIG_FAILED__,$(1))
293 ifeq ($(BID_MISSING_PKGS),)
295 ifneq ($(REQUIRES_LIBS),)
296 REQUIRES_LIBS_LIST := $(strip $(call BID_PKG_CONFIG,$(OBJ_BASE),--libs,$(REQUIRES_LIBS)))
298 ifneq ($(call BID_PKG_CONFIG_FAILED,$(REQUIRES_LIBS_LIST)),)
299 BID_MISSING_PKGS := $(strip $(foreach i,$(REQUIRES_LIBS), \
300 $(if $(filter __PKGCONFIG_FAILED__,$(call BID_PKG_CONFIG,$(OBJ_BASE),--print-errors,$(i))),$(i))))
301 text := $(shell echo -e "\033[31mLibrary dependencies missing: \033[1m$(BID_MISSING_PKGS)\033[22m in directory '$(SRC_DIR)'; aborting.\033[0m")
302 $(if $(BID_MISSING_PKGS),$(info $(text)),$(error $(text)))
306 ifneq ($(filter libl4re-vfs,$(REQUIRES_LIBS)),)
307 $(error Never include 'libl4re-vfs'!)
311 BID_PKG_CONFIG_CFLAGS := $(call BID_PKG_CONFIG,$(OBJ_BASE),--cflags, $(REQUIRES_CFLAGS) $(REQUIRES_LIBS))
314 ifneq ($(call BID_PKG_CONFIG_FAILED,$(BID_PKG_CONFIG_CFLAGS)),)
315 BID_MISSING_PKGS := $(strip $(foreach i,$(REQUIRES_CFLAGS) $(REQUIRES_LIBS), \
316 $(if $(filter __PKGCONFIG_FAILED__,$(call BID_PKG_CONFIG,$(OBJ_BASE),--print-errors,$(i))),$(i))))
317 text := $(shell echo -e "\033[31mCflags dependencies missing: \033[1m$(BID_MISSING_PKGS)\033[22m in directory '$(SRC_DIR)'; aborting.\033[0m")
323 # -----------------------
325 # May 2007: force somewhat old hash-style as some(!, independant of the
326 # actual version) ld now use an other format, no uclibc upstream fix
327 # available yet, until available, we need:
328 ifeq ($(LD_HAS_HASH_STYLE_OPTION),y)
329 ifneq ($(HOST_LINK),1)
330 LDFLAGS += --hash-style=sysv
334 OPTS ?= -g -O2 -fno-strict-aliasing
335 WARNINGS?= -Wextra -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(WARNINGS_$@)
338 # never cross compile in host mode
343 # no architecture specific flags in host mode
344 LDFLAGS += $(LDFLAGS_$(ARCH))
345 OPTS += $(CARCHFLAGS_$(ARCH)) $(CARCHFLAGS_$(ARCH)_$(CPU))
348 # no link address if build a lib or we're compiling a host program and using
349 # the host linker scripts
350 ifeq ($(ROLE),lib.mk)
351 NO_DEFAULT_RELOC := y
353 ifneq ($(HOST_LINK),)
354 NO_DEFAULT_RELOC := y
357 default_reloc_base = $(firstword $(DEFAULT_RELOC_$(1)) \
358 $(DEFAULT_RELOC_$(ARCH)) \
360 $(if $(NO_DEFAULT_RELOC),,0x01000000))
361 default_reloc = $(if $(call default_reloc_base,$(1)),\
362 $(if $(RELOC_PHYS), \
363 $(shell printf "0x%x" $$(($(RAM_BASE) + $(call default_reloc_base,$(1))))), \
364 $(call default_reloc_base,$(1))))
366 # can be overwritten to get the old mode
367 CFLAGS_C99 ?= -std=gnu99
369 $(CLIENTIDL:.idl=-client.o): CFLAGS += -ffunction-sections
370 CFLAGS += $(if $(CONFIG_BID_GCC_OMIT_FP),-fomit-frame-pointer,)
371 CFLAGS += $(CFLAGS_$(OSYSTEM)) $(CFLAGS_$(<F)) $(CFLAGS_$(<D)) $(CFLAGS_$(<F)_$(OSYSTEM))
372 CFLAGS += $(CFLAGS_$(L4API))
373 CFLAGS += $(OPTS) $(WARNINGS)
374 CFLAGS += -fno-common
375 CFLAGS += $(CFLAGS_C99)
377 CFLAGS += $(GCCNOSTACKPROTOPT)
379 DEFINES-$(L4_MULTITHREADED) += -DL4_THREAD_SAFE
380 DEFINES += $(DEFINES_$(OSYSTEM)) $(DEFINES_$(<F)) $(DEFINES_$(<D)) $(DEFINES_$(<F)_$(OSYSTEM))
381 DEFINES += -DSYSTEM_$(subst -,_,$(SYSTEM)) -DARCH_$(ARCH) -DCPUTYPE_$(CPU) -DL4API_$(L4API)
382 DEFINES += $(DEFINES-y)
383 DEFINES += -D_GNU_SOURCE
385 ifeq (,$(filter 0 n N, $(DEBUG)))
390 CPPFLAGS-DEBUG_MODE = \
391 $(addprefix -include, $(OBJ_BASE)/include/$(ARCH)/l4/sys/kdebug.h) \
392 $(addprefix -include, $(wildcard $(if $(L4API),$(OBJ_BASE)/include/$(ARCH)/$(L4API)/l4/sys/ktrace.h) \
393 $(OBJ_BASE)/include/$(ARCH)/l4/sys/ktrace.h)) \
394 -include $(OBJ_BASE)/include/l4/util/kprintf.h \
395 $(if $(L4API),-include $(OBJ_BASE)/include/l4/sys/debugger.h)
397 CPPFLAGS+= $(CPPFLAGS_$(OSYSTEM)) $(CPPFLAGS_$(<F)) $(CPPFLAGS_$(<D)) $(CPPFLAGS_$(<F)_$(OSYSTEM))
398 CPPFLAGS+= $(DEFINES)
399 CPPFLAGS+= $(addprefix -I, $(PRIVATE_INCDIR) $(PRIVATE_INCDIR_$(OSYSTEM)) $(PRIVATE_INCDIR_$@) $(PRIVATE_INCDIR_$@_$(OSYSTEM)))
400 CPPFLAGS+= $(if $(CONTRIB_INCDIR),$(addprefix -I$(OBJ_BASE)/include/contrib/,$(CONTRIB_INCDIR)))
401 CPPFLAGS+= $(BID_PKG_CONFIG_CFLAGS)
402 CPPFLAGS+= $(if $(CLIENTIDL)$(SERVERIDL)$(addprefix CLIENTIDL_,$(TARGET))$(addprefix SERVERIDL_,$(TARGET)),$(addprefix -I, $(IDL_PATH)))
404 CPPFLAGS+= $(addprefix -I, $(L4INCDIR))
406 CPPFLAGS+= $(if $(DEBUG_MODE),$(CPPFLAGS-DEBUG_MODE))
407 CPPFLAGS+= $(if $(filter $(L4_MULTITHREADED),y),-DL4_THREAD_SAFE)
408 CPPFLAGS+= $(LIBCINCDIR)
410 CXXFLAGS_NOEXC = -DL4_NO_RTTI -fno-rtti -fno-exceptions
411 CXXFLAGS-$(BID_INT_NOEXC) = $(CXXFLAGS_NOEXC)
413 CXXFLAGS+= $(if $(CONFIG_BID_GCC_OMIT_FP),-fomit-frame-pointer,)
414 CXXFLAGS+= $(CXXFLAGS_$(OSYSTEM))
415 CXXFLAGS+= $(CXXFLAGS_$(@:.o=.cc)) $(CXXFLAGS_$(@:.o=.cc)_$(OSYSTEM))
416 CXXFLAGS+= $(CXXFLAGS_$(@:.o=.cpp)) $(CXXFLAGS_$(@:.o=.cpp)_$(OSYSTEM))
417 CXXFLAGS+= $(OPTS) $(filter-out -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wno-pointer-sign,$(WARNINGS))
418 CXXFLAGS+= $(CXXFLAGS-y)
419 CXXFLAGS+= -fno-common
421 CXXFLAGS+= $(GCCNOSTACKPROTOPT)
424 PICFLAGS = -fPIC -U__PIC__ -D__PIC__=1
426 ASFLAGS += $(OPTS) $(ASFLAGS_$(ARCH)) $(ASFLAGS_$(@:.o=.S)) $(ASFLAGS_$(@:.o=.S)_$(OSYSTEM))
427 OBJS += $(strip $(OBJS_$(OSYSTEM)) $(OBJS_$@) $(OBJS_$@_$(OSYSTEM)))
428 ALLOBJS = $(OBJS) $(foreach target,$(TARGET) $(TARGET_$(OSYSTEM)),\
429 $(OBJS_$(target)) $(OBJS_$(target)_$(OSYSTEM)))
430 ALLDPI = $(sort $(foreach obj,$(ALLOBJS),$(patsubst %.dpe,%.dpi,\
431 $(DPE_$(obj:.o=.c)))))
433 # implementation of $(CLIENTIDL) and $(SERVERIDL)
435 IDL_PKGDIR ?= $(PKGDIR_OBJ)
436 IDL_PATH ?= $(addsuffix /idl/OBJ-$(ARCH)-$(L4API),$(IDL_PKGDIR))
437 ifneq ($(IDL_TYPE), dice)
438 ifneq ($(IDL_TYPE), corba)
439 $(error IDL_TYPE "$(IDL_TYPE)" not supported.)
443 # A function to deliver the source files generated from IDL-files and
444 # that should be linked to a given target. Used by "targetobjs" to write
445 # the target-objects and in the "Makefile.inc:"-rule to write the IDL_SRC_C-
448 IDL_SRC_Cfn = $(CLIENTIDL:.idl=-client.c) $(SERVERIDL:.idl=-server.c) \
449 $(foreach inter, $(OSYSTEM) $(1) $(1)_$(OSYSTEM), \
450 $(CLIENTIDL_$(inter):.idl=-client.c) \
451 $(SERVERIDL_$(inter):.idl=-server.c))
452 IDL_SRC_CCfn = $(CLIENTIDL:.idl=-client.cc) $(SERVERIDL:.idl=-server.cc) \
453 $(foreach inter, $(OSYSTEM) $(1) $(1)_$(OSYSTEM), \
454 $(CLIENTIDL_$(inter):.idl=-client.cc) \
455 $(SERVERIDL_$(inter):.idl=-server.cc))
457 # *all* CLIENTIDLs/SERVERIDLs
458 # needed for the test if we should include the IDL-Path into vpath
459 IDL_ALLCLIENTIDL = $(CLIENTIDL) $(CLIENTIDL_$(OSYSTEM)) \
460 $(foreach target,$(TARGET) $(TARGET_$(OSYSTEM)), \
461 $(CLIENTIDL_$(target)) $(CLIENTIDL_$(target)_$(OSYSTEM)))
462 IDL_ALLSERVERIDL = $(SERVERIDL) $(SERVERIDL_$(OSYSTEM)) \
463 $(foreach target,$(TARGET) $(TARGET_$(OSYSTEM)), \
464 $(SERVERIDL_$(target)) $(SERVERIDL_$(target)_$(OSYSTEM)))
466 ifneq ($(IDL_ALLCLIENTIDL),)
467 vpath %-client.c $(IDL_PATH)
468 vpath %-client.cc $(IDL_PATH)
470 ifneq ($(IDL_ALLSERVERIDL),)
471 vpath %-server.c $(IDL_PATH)
472 vpath %-server.cc $(IDL_PATH)
477 # 2 - infix between the basename and the .o
478 # 3 - additional infix before .o in case of .cc files
479 targetobjs_gen = $(SRC_C:.c=$(2).o) $(SRC_S:.S=$(2).o) \
480 $(SRC_CC:.cc=$(2)$(3).o) \
481 $(foreach inter, $(OSYSTEM) $(1) $(1)_$(OSYSTEM), \
482 $(SRC_C_$(inter):.c=$(2).o) \
483 $(SRC_S_$(inter):.S=$(2).o) \
484 $(SRC_CC_$(inter):.cc=$(2)$(3).o)) \
485 $(patsubst %.c,%$(2).o,$(call IDL_SRC_Cfn,$(1)))
487 # a helper function to generate the object-files for a given target
489 # 2 - infix between the basename and the .o
490 targetobjs = $(call targetobjs_gen,$(1),$(2),)
492 # special version of targetobjs that shares objects between exception and
493 # non-exception cases, we just need two versions for C++ files
495 # 2 - infix between the basename and the .o or .ne.o
496 targetobjs_ne = $(call targetobjs_gen,$(1),$(2),.ne)
498 # The directories our object files will go into. These dirs will be created
499 # on generation of Makefile.inc in the OBJ- dirs.
500 OBJDIRS = $(strip $(sort $(filter-out ./,$(dir \
501 $(foreach t,$(TARGET_STANDARD), \
502 $(call targetobjs,$(t),)) \
503 $(foreach t,$(TARGET_STANDARD_NE), \
504 $(call targetobjs,$(t),.ne)) \
505 $(foreach t,$(TARGET_SHARED), \
506 $(call targetobjs,$(t),)) \
507 $(foreach t,$(TARGET_SHARED_NE), \
508 $(call targetobjs,$(t),.ne)) \
509 $(foreach t,$(PROFILE), \
510 $(call targetobjs,$(t),.pr)) \
511 $(foreach t,$(TARGET_PROFILE_PIC) $(TARGET_PROFILE_SHARED),\
512 $(call targetobjs,$(t),.pr.s))))))
514 # The include file for the Makefile. This file contains definitions and
515 # dependencies which are dynamically generated. Unfortunately, make does
516 # not support variable declarations using the foreach function. Same
518 $(BID_OBJ_Makefile).inc: .general.d
520 @$(ECHO) "# automatically generated, do not edit!" >$@_
521 # write helper variables containing the IDL-C-Sources
522 @$(ECHO) -en '$(strip $(foreach target,$(TARGET), \
523 \nIDL_SRC_C_$(target)=$(call IDL_SRC_Cfn,$(target))))'>>$@_
524 # and add them to SRC_C
525 @$(ECHO) -en '$(strip $(foreach target,$(TARGET), \
526 \nSRC_C_$(target) += $$(IDL_SRC_C_$(target))))'>>$@_
527 # but set the variables empty for the current rule
528 @$(ECHO) -en '$(strip $(foreach target,$(TARGET), \
529 \n$(BID_OBJ_Makefile).inc: IDL_SRC_C_$(target)=))'>>$@_
530 # write helper variables containing the IDL-C++-Sources
531 @$(ECHO) -en '$(strip $(foreach target,$(TARGET), \
532 \nIDL_SRC_CC_$(target)=$(call IDL_SRC_CCfn,$(target))))'>>$@_
533 # and add them to SRC_CC
534 @$(ECHO) -en '$(strip $(foreach target,$(TARGET), \
535 \nSRC_CC_$(target) += $$(IDL_SRC_CC_$(target))))'>>$@_
536 # but set the variables empty for the current rule
537 @$(ECHO) -en '$(strip $(foreach target,$(TARGET), \
538 \n$(BID_OBJ_Makefile).inc: IDL_SRC_CC_$(target)=))'>>$@_
539 # write the object declaration variables
540 # TARGET_{STANDARD, PIC, SHARED, STANDARD_NE, SHARED_NE}
541 # contain the appropriate targets
542 # TARGET_PROFILE_{STANDARD, PIC, SHARED} as well
543 @$(ECHO) -en '$(strip $(foreach target,$(TARGET_STANDARD), \
544 \nOBJS_$(target) += $(call targetobjs,$(target),)))' >>$@_
545 @$(ECHO) -en '$(strip $(foreach target,$(TARGET_STANDARD_NE), \
546 \nOBJS_$(target) += $(call targetobjs_ne,$(target),)))' >>$@_
547 @$(ECHO) -en '$(strip $(foreach target,$(TARGET_PIC) $(TARGET_SHARED), \
548 \nOBJS_$(target) += $(call targetobjs,$(target),.s)))' >>$@_
549 @$(ECHO) -en '$(strip $(foreach target,$(TARGET_PIC_NE) $(TARGET_SHARED_NE), \
550 \nOBJS_$(target) += $(call targetobjs_ne,$(target),.s) \
551 \nLINK_WITH_NOEXC_LIBS_$(target) = y))' >>$@_
552 @$(ECHO) -en '$(strip $(foreach target,$(TARGET_PROFILE), \
553 \nOBJS_$(target) += $(call targetobjs,$(target),.pr)))' >>$@_
554 @$(ECHO) -e '$(strip $(foreach target,$(TARGET_PROFILE_PIC) $(TARGET_PROFILE_SHARED), \
555 \nOBJS_$(target) += $(call targetobjs,$(target),.pr.s)))' >>$@_
557 # write the dpe-dependencies
558 @$(ECHO) -e '$(foreach obj,$(sort \
559 $(foreach t,$(TARGET_STANDARD),$(call targetobjs,$t)) \
560 $(foreach t,$(TARGET_PIC) $(TARGET_SHARED), \
561 $(call targetobjs,$t,.s)) \
562 $(foreach t,$(TARGET_PROFILE),$(call targetobjs,$t,.pr)) \
563 $(foreach t,$(TARGET_PROFILE_PIC) $(TARGET_PROFILE_SHARED),\
564 $(call targetobjs,$t,.pr.s))),$(strip \
565 $(addprefix \n$(obj): ,$(patsubst %.dpe,%.dpi, \
566 $(DPE_$(obj:.o=.c)) $(DPE_$(obj:.o=.cc)) \
567 $(DPE_$(obj:.s.o=.c)) $(DPE_$(obj:.s.o=.cc)) \
568 $(DPE_$(obj:.pr.o=.c)) $(DPE_$(obj:.pr.o=.cc)) \
569 $(DPE_$(obj:.pr.s.o=.c)) $(DPE_$(obj:.pr.s.o=.cc)) \
572 # create the object-dirs
573 @$(if $(OBJDIRS), $(VERBOSE)set -e; for d in $(OBJDIRS); do \
574 [ -d "$$d" ] || $(MKDIR) $$d; done )
575 @[ -d "noexc" ] || $(MKDIR) noexc
576 @[ -d "r" ] || $(MKDIR) r
579 # write the object-dependencies for the targets
580 @$(ECHO) -e '$(foreach target,$(TARGET),$(strip\
581 \n$(target): $$(OBJS_$(target)) ))' >> $@_
582 # make the target dependent on '.general.d'
583 @$(ECHO) -e '$(foreach target,$(TARGET),$(strip \
584 \n$$(OBJS_$(target)): .general.d))' \
586 # Using LDSO does not need a RELOC address, so omit the following in
588 ifneq ($(MODE),shared)
589 # in case of a binary, write the link address
590 # the dependency to the static file: If DEFAULT_RELOC is set,
591 # all targets are made dependent on the STATIC file
592 # (defined in Makeconf).
593 # If DEFAULT_RELOC_xxx is set, xxx is made dependent on the
595 ifneq ($(strip $(foreach target,$(TARGET), $(call default_reloc,$(target)))),)
596 ifneq ($(filter l4linux host,$(MODE)),)
597 $(error DEFAULT_RELOC must not be set if MODE is l4linux or host)
599 # the relocatable binaries depend on Makefile.inc
600 @$(ECHO) -e '\n$(strip \
601 $(foreach target, $(TARGET), \
602 $(if $(call default_reloc,$(target)),$(target))) \
604 ifneq ($(wildcard $(STATICFILE)),)
605 # Makefile.inc depends on STATIC
606 @$(ECHO) -e '\n$@: $(firstword $(wildcard $(STATICFILE)))' >>$@_
607 # we find out the relocation address here.
608 @$(ECHO) -e '$(foreach target, $(TARGET),$(strip \
609 \nLDFLAGS_$(target)+= -Ttext=$(firstword \
610 $(shell $(AWKP) -v prog=$(target) \
611 "/^[^\#]/{if(\$$2==prog){print $$1; exit}}" \
612 < $(firstword $(wildcard $(STATICFILE)))) \
613 $(call default_reloc,$(target)))))' \
615 # and the dummy-rule to rebuild myself if STATIC disappears
616 @$(ECHO) -e '\n$(firstword $(wildcard $(STATICFILE))): ' >>$@_
618 # STATIC does not exist. rebuild myself if STATIC appears
619 @$(ECHO) -e '\n$$(if $$(wildcard $(STATICFILE)), $@: FORCE)' \
621 # we find out the relocation address here.
622 @$(ECHO) -e '$(foreach target, $(TARGET),$(strip \
623 \nLDFLAGS_$(target)+= -Ttext=$(firstword \
624 $(call default_reloc,$(target)))))' \
628 endif # MODE != shared
631 ifeq ($(filter scrub help,$(MAKECMDGOALS)),)
632 -include $(BID_OBJ_Makefile).inc
639 # the default target "all" ensures building of the targets. When multiple
640 # architectures are used, the targets are build in subdirs.
642 # the relink-rule: make the TARGETs phony. Specification of build-targets
643 # in MAKECMDGOALS is not allowed. Possibility: TARGET=
645 ifneq ($(filter relink,$(MAKECMDGOALS)),)
654 # Compilation rules with dependency-generation
656 # If we have ld.so, we use it to create our dependencies (see MAKEDEP
657 # definition). Otherwise, we fall back to whatever we need. For
658 # compilation with gcc, this is using "-MD" and postprocessing the
661 ifeq ($(CONFIG_HAVE_LDSO),)
662 LIBDEPS = $(foreach file, \
663 $(patsubst -l%,lib%.a,$(filter-out -L%,$(LDFLAGS))) \
664 $(patsubst -l%,lib%.so,$(filter-out -L%,$(LDFLAGS))),\
665 $(word 1, $(foreach dir, \
667 $(filter -L%,$(LDFLAGS) $(L4ALL_LIBDIR))),\
668 $(wildcard $(dir)/$(file)))))
670 DEPEND_EXTEND_CMD = $(AWKP) ' \
672 while(sub("\\\\$$","")){ \
674 $$0=$$0 " " nextline \
676 split($$0,field,": "); \
677 sub("^$(*F).o","$*.s $*.i $@",field[1]); \
678 nr=split(field[2],deps) ; \
680 printf("ifeq ($$(shell test y \\\n"); \
681 for(j=0; j<100 && i+j<=nr; j++){ \
682 printf("-a -r %s \\\n", deps[i+j]); \
684 printf("&& echo y),)"); \
685 printf("\n%s: FORCE\nelse\n%s: $(BID_OBJ_Makefile) \\\n", \
686 field[1],field[1]); \
687 for(j=0; j<100 && i+j<=nr; j++){ \
688 printf("%s \\\n",deps[i+j]); \
690 printf("\nendif\n"); \
694 DEPEND_EXTEND_FUNC = ( $(DEPEND_EXTEND_CMD) < $(1) > $(2).new && rm -f $(1) && mv $(2).new $(2) ) || ( rm -f $(1) $(2).new $(2) ; $(DEPEND_IGNORE_ERRORS) )
698 endif # CONFIG_HAVE_LDSO empty
702 $(VERBOSE)$(call MAKEDEP,$(INT_CXX_NAME)) $(CXX) -c $(DEPEND_FLAG) $(CPPFLAGS) $(CXXFLAGS) $(call absfilename,$<) -o $@
703 $(DEPEND_VERBOSE)$(call DEPEND_EXTEND_FUNC, $(*F).d, $(dir $@).$(notdir $@).d)
707 $(VERBOSE)$(call MAKEDEP,$(INT_CXX_NAME)) $(CXX) -c $(DEPEND_FLAG) $(CPPFLAGS) $(CXXFLAGS_NOEXC) $(CXXFLAGS) $(call absfilename,$<) -o $@
708 $(DEPEND_VERBOSE)$(call DEPEND_EXTEND_FUNC, $(*F).d, $(dir $@).$(notdir $@).d)
712 $(VERBOSE)$(call MAKEDEP,$(INT_CXX_NAME)) $(CXX) -c $(DEPEND_FLAG) $(CPPFLAGS) $(CXXFLAGS) $(PICFLAGS) $(call absfilename,$<) -o $@
713 $(DEPEND_VERBOSE)$(call DEPEND_EXTEND_FUNC, $(*F).d, $(dir $@).$(notdir $@).d)
717 $(VERBOSE)$(call MAKEDEP,$(INT_CXX_NAME)) $(CXX) -c $(DEPEND_FLAG) $(CPPFLAGS) $(CXXFLAGS_NOEXC) $(CXXFLAGS) $(PICFLAGS) $(call absfilename,$<) -o $@
718 $(DEPEND_VERBOSE)$(call DEPEND_EXTEND_FUNC, $(*F).d, $(dir $@).$(notdir $@).d)
722 $(VERBOSE)$(call MAKEDEP,$(INT_CXX_NAME)) $(CXX) -c $(DEPEND_FLAG) $(CPPFLAGS) $(CXXFLAGS) -DPROFILE -pg $(call absfilename,$<) -o $@
723 $(DEPEND_VERBOSE)$(call DEPEND_EXTEND_FUNC, $(*F).d, $(dir $@).$(notdir $@).d)
727 $(VERBOSE)$(call MAKEDEP,$(INT_CXX_NAME)) $(CXX) -c $(DEPEND_FLAG) $(CPPFLAGS) $(CXXFLAGS) $(PICFLAGS) -DPROFILE -pg $(call absfilename,$<) -o $@
728 $(DEPEND_VERBOSE)$(call DEPEND_EXTEND_FUNC, $(*F).d, $(dir $@).$(notdir $@).d)
732 $(VERBOSE)$(call MAKEDEP,$(INT_CXX_NAME)) $(CXX) -c $(DEPEND_FLAG) $(CPPFLAGS) $(CXXFLAGS) $(call absfilename,$<) -o $@
733 $(DEPEND_VERBOSE)$(call DEPEND_EXTEND_FUNC, $(*F).d, $(dir $@).$(notdir $@).d)
737 $(VERBOSE)$(call MAKEDEP,$(INT_CXX_NAME)) $(CXX) -c $(DEPEND_FLAG) $(CPPFLAGS) $(CXXFLAGS) $(PICFLAGS) $(call absfilename,$<) -o $@
738 $(DEPEND_VERBOSE)$(call DEPEND_EXTEND_FUNC, $(*F).d, $(dir $@).$(notdir $@).d)
742 $(VERBOSE)$(call MAKEDEP,$(INT_CXX_NAME)) $(CXX) -c $(DEPEND_FLAG) $(CPPFLAGS) $(CXXFLAGS) -DPROFILE -pg $(call absfilename,$<) -o $@
743 $(DEPEND_VERBOSE)$(call DEPEND_EXTEND_FUNC, $(*F).d, $(dir $@).$(notdir $@).d)
747 $(VERBOSE)$(call MAKEDEP,$(INT_CXX_NAME)) $(CXX) -c $(DEPEND_FLAG) $(CPPFLAGS) $(CXXFLAGS) $(PICFLAGS) -DPROFILE -pg $(call absfilename,$<) -o $@
748 $(DEPEND_VERBOSE)$(call DEPEND_EXTEND_FUNC, $(*F).d, $(dir $@).$(notdir $@).d)
752 $(VERBOSE)$(call MAKEDEP,$(INT_CPP_NAME)) $(CC) -c $(DEPEND_FLAG) $(CPPFLAGS) $(CFLAGS) $(call absfilename,$<) -o $@
753 $(DEPEND_VERBOSE)$(call DEPEND_EXTEND_FUNC, $(*F).d, $(dir $@).$(notdir $@).d)
757 $(VERBOSE)$(call MAKEDEP,$(INT_CPP_NAME)) $(CC) -c $(DEPEND_FLAG) $(CPPFLAGS) $(CFLAGS) $(PICFLAGS) $(call absfilename,$<) -o $@
758 $(DEPEND_VERBOSE)$(call DEPEND_EXTEND_FUNC, $(*F).d, $(dir $@).$(notdir $@).d)
762 $(VERBOSE)$(call MAKEDEP,$(INT_CPP_NAME)) $(CC) -c $(DEPEND_FLAG) $(CPPFLAGS) $(CFLAGS) -DPROFILE -pg $(call absfilename,$<) -o $@
763 $(DEPEND_VERBOSE)$(call DEPEND_EXTEND_FUNC, $(*F).d, $(dir $@).$(notdir $@).d)
767 $(VERBOSE)$(call MAKEDEP,$(INT_CPP_NAME)) $(CC) -c $(DEPEND_FLAG) $(CPPFLAGS) $(CFLAGS) $(PICFLAGS) -DPROFILE -pg $(call absfilename,$<) -o $@
768 $(DEPEND_VERBOSE)$(call DEPEND_EXTEND_FUNC, $(*F).d, $(dir $@).$(notdir $@).d)
772 $(VERBOSE)$(call MAKEDEP,$(INT_CPP_NAME)) $(CC) -c $(DEPEND_FLAG) $(CPPFLAGS) $(ASFLAGS) $(call absfilename,$<) -o $@
773 $(DEPEND_VERBOSE)$(call DEPEND_EXTEND_FUNC, $(*F).d, $(dir $@).$(notdir $@).d)
777 $(VERBOSE)$(call MAKEDEP,$(INT_CPP_NAME)) $(CC) -c $(DEPEND_FLAG) $(CPPFLAGS) $(ASFLAGS) $(PICFLAGS) $(call absfilename,$<) -o $@
778 $(DEPEND_VERBOSE)$(call DEPEND_EXTEND_FUNC, $(*F).d, $(dir $@).$(notdir $@).d)
782 $(VERBOSE)$(call MAKEDEP,$(INT_CPP_NAME)) $(CC) -c $(DEPEND_FLAG) $(CPPFLAGS) $(ASFLAGS) -DPROFILE -pg $(call absfilename,$<) -o $@
783 $(DEPEND_VERBOSE)$(call DEPEND_EXTEND_FUNC, $(*F).d, $(dir $@).$(notdir $@).d)
787 $(VERBOSE)$(call MAKEDEP,$(INT_CPP_NAME)) $(CC) -c $(DEPEND_FLAG) $(CPPFLAGS) $(ASFLAGS) $(PICFLAGS) -DPROFILE -pg $(call absfilename,$<) -o $@
788 $(DEPEND_VERBOSE)$(call DEPEND_EXTEND_FUNC, $(*F).d, $(dir $@).$(notdir $@).d)
792 $(VERBOSE)$(CONFIG_YACC) $(YFLAGS) $(call absfilename,$<)
793 $(VERBOSE)mv -f y.tab.c $@
794 $(VERBOSE)if [ -f y.tab.h ]; then mv -f y.tab.h $(@:.c=.h); fi
798 $(VERBOSE)$(CONFIG_LEX) -o$@ $(call absfilename,$<)
802 $(VERBOSE)$(CC) -E -H -dD $(CPPFLAGS) $(CFLAGS) $(call absfilename,$<) -o $@
803 $(VERBOSE)$(INDENT) -o $@ $@
804 $(VERBOSE)$(if $(DO_SHOW_RESULT_FILE),$(PAGER) $@)
808 $(VERBOSE)$(CC) -E -H -dD $(CPPFLAGS) $(CFLAGS) $(PICFLAGS) $(call absfilename,$<) -o $@
809 $(VERBOSE)$(INDENT) -o $@ $@
810 $(VERBOSE)$(if $(DO_SHOW_RESULT_FILE),$(PAGER) $@)
814 $(VERBOSE)$(CXX) -E -H -dD $(CPPFLAGS) $(CXXFLAGS) $(call absfilename,$<) -o $@
815 $(VERBOSE)$(INDENT) -sob -o $@ $@
816 $(VERBOSE)$(if $(DO_SHOW_RESULT_FILE),$(PAGER) $@)
820 $(VERBOSE)$(CXX) -E -H -dD $(CPPFLAGS) $(CXXFLAGS) $(PICFLAGS) $(call absfilename,$<) -o $@
821 $(VERBOSE)$(INDENT) -sob -o $@ $@
822 $(VERBOSE)$(if $(DO_SHOW_RESULT_FILE),$(PAGER) $@)
826 $(VERBOSE)$(CXX) -E -H -dD $(CPPFLAGS) $(CXXFLAGS) $(call absfilename,$<) -o $@
827 $(VERBOSE)$(INDENT) -sob -o $@ $@
828 $(VERBOSE)$(if $(DO_SHOW_RESULT_FILE),$(PAGER) $@)
832 $(VERBOSE)$(CC) -E -H -dD $(CPPFLAGS) $(ASFLAGS) $(call absfilename,$<) -o $@
833 $(VERBOSE)$(INDENT) -sob -o $@ $@
834 $(VERBOSE)$(if $(DO_SHOW_RESULT_FILE),$(PAGER) $@)
838 $(VERBOSE)$(CC) -S $(CFLAGS) $(CPPFLAGS) $(call absfilename,$<) -fverbose-asm -o $@
842 $(VERBOSE)$(CXX) -S $(CXXFLAGS) $(CPPFLAGS) $(call absfilename,$<) -fverbose-asm -o $@
846 $(VERBOSE)$(CXX) -S $(CXXFLAGS) $(CPPFLAGS) $(call absfilename,$<) -fverbose-asm -o $@
850 $(VERBOSE)$(call MAKEDEP,perl) $(GEN_DOPECODE) $< >$@
852 DEPS += $(foreach file,$(ALLOBJS), $(dir $(file)).$(notdir $(file)).d)
853 DEPS += $(foreach file,$(ALLDPI), $(dir $(file)).$(notdir $(file)).d)
858 $(VERBOSE)$(RM) $(strip $(filter-out $(KEEP_ON_CLEAN),\
859 $(wildcard *.dpi) $(wildcard *.o) $(wildcard *.i) \
860 $(wildcard *.S) $(ALLOBJS) $(DEL_ON_CLEAN)))
862 # clean: delete all temporary editor files, objects, binaries
863 # and most generated files
865 $(VERBOSE)$(RM) $(TARGET) $(wildcard .*.d) $(wildcard $(BID_OBJ_Makefile).inc)
867 .PHONY: scrub clean cleanall disasm
869 endif # $(SYSTEM) is defined
873 # scrub: delete temporary editor files and stuff like this
874 # can be extended by lokals