#---------------------------------------------------------------------------- # GNU Makefile # # @file <%project_file%> # # gnu.mpd,v 1.65 2003/12/15 18:50:46 jwillemsen Exp # # This file was automatically generated by MPC. Any changes made directly to # this file will be lost the next time it is generated. # #---------------------------------------------------------------------------- <%marker(top)%> MAKEFILE = <%project_file%> DEPENDENCY_FILE = .depend.<%project_file%> <%if(exename)%> BIN_UNCHECKED = <%exename%> <%endif%> <%if(staticname)%> ## LIB may be set to empty later on in this file LIB_UNCHECKED = lib<%staticname%>.a LIB = $(LIB_UNCHECKED) <%if(!sharedname)%> static_libs_only = 1 <%endif%> <%endif%> <%if(sharedname)%> ## SHLIB may be set to empty later on in this file SHLIB_UNCHECKED = lib<%sharedname%>.$(SOEXT) SHLIB = $(SHLIB_UNCHECKED) <%endif%> <%if(tao)%> ifndef TAO_ROOT TAO_ROOT = $(ACE_ROOT)/TAO endif ifndef CIAO_ROOT CIAO_ROOT = $(TAO_ROOT)/CIAO endif <%endif%> <%if(idl_files)%> TAO_IDL = <%idl_compiler%> IDL_FILES =<%foreach(idl_files)%> <%noextension(idl_file)%><%endfor%> IDL_SRC = $(foreach ext, C.cpp S.cpp, $(foreach file, $(IDL_FILES), $(file)$(ext))) <%endif%> <%if(grouped_source_files)%> <%foreach(grouped_source_files)%> <%grouped_source_file%> = \ <%foreach(grouped_source_file->files)%> <%noextension(grouped_source_file->file)%><%fornotlast(" \\")%> <%endfor%> <%endfor%> ifndef <%grouped_source_files->component_name%> <%grouped_source_files->component_name%> = \ <%foreach(grouped_source_files)%> <%grouped_source_file%><%fornotlast(" \\")%> <%endfor%> endif # <%grouped_source_files->component_name%> <%foreach(grouped_source_files)%> ifneq (,$(findstring <%grouped_source_file%>, $(<%grouped_source_files->component_name%>))) FILES += $(<%grouped_source_file%>) endif # <%grouped_source_file%> <%endfor%> <%else%> FILES = \ <%foreach(source_files)%> <%noextension(source_file)%><%fornotlast(" \\")%> <%endfor%> <%endif%> <%if(resource_files)%> RESOURCES += \ <%foreach(resource_files)%> <%resource_file%><%fornotlast(" \\")%> <%endfor%> <%endif%> <%vpath%> #---------------------------------------------------------------------------- # Include macros and targets #---------------------------------------------------------------------------- <%marker(macros)%> <%if(exename)%> LDLIBS =<%foreach(libs)%> -l<%lib%><%endfor%><%foreach(lit_libs)%> -l<%lit_lib%><%endfor%><%foreach(defaultlibs)%> -l<%defaultlib%><%endfor%> <%else%> <%if(sharedname)%> ACE_SHLIBS =<%foreach(libs)%> -l<%lib%><%endfor%><%foreach(lit_libs)%> -l<%lit_lib%><%endfor%><%foreach(defaultlibs)%> -l<%defaultlib%><%endfor%> <%endif%> <%endif%> include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU ## We don't need the ACELIB setting from wrapper_macros.GNU ACELIB = <%if(tao)%> include $(TAO_ROOT)/rules.tao.GNU <%endif%> # To build multiple executables in the same directory on AIX, it works # best to have a template directory per project. # The compiler/linker isn't too smart about instantiating templates... ifdef TEMPINCDIR TEMPINCDIR := $(TEMPINCDIR)/<%project_name%> all: $(TEMPINCDIR) endif <%if(exename)%> OUTPUT_DIRECTORY = <%if(install)%><%install%><%else%>.<%endif%> <%else%> OUTPUT_DIRECTORY = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%> <%endif%> all: $(OUTPUT_DIRECTORY) $(OUTPUT_DIRECTORY): -@mkdir -p "$(OUTPUT_DIRECTORY)" <%if(!exename)%> <%if(compname)%> CURRENT_COMPONENTS := $(shell sh $(ACE_ROOT)/bin/ace_components <%compname%>) <%endif%> <%foreach(requires)%> ifeq ($(<%require%>),1) <%endfor%> <%foreach(avoids)%> ifneq ($(<%avoid%>),1) <%endfor%> <%foreach(comps)%> ifeq (<%comp%>, $(findstring <%comp%>, $(CURRENT_COMPONENTS))) <%endfor%> <%foreach(comps)%> else <%if(staticname)%> LIB = <%endif%> <%if(sharedname)%> SHLIB = <%endif%> all: comp_warning endif <%endfor%> <%foreach(avoids)%> else <%if(staticname)%> LIB = <%endif%> <%if(sharedname)%> SHLIB = <%endif%> all: avoid_warning endif <%endfor%> <%foreach(requires)%> else <%if(staticname)%> LIB = <%endif%> <%if(sharedname)%> SHLIB = <%endif%> all: require_warning endif <%endfor%> <%if(tagname)%> ifeq (,$(<%tagname%>)) <%endif%> <%foreach(requires)%> ifeq ($(<%require%>),1) <%endfor%> <%foreach(avoids)%> ifneq ($(<%avoid%>),1) <%endfor%> <%foreach(avoids)%> else <%if(staticname)%> LIB = <%endif%> <%if(sharedname)%> SHLIB = <%endif%> all: avoid_warning endif <%endfor%> <%foreach(requires)%> else <%if(staticname)%> LIB = <%endif%> <%if(sharedname)%> SHLIB = <%endif%> all: require_warning endif <%endfor%> <%if(tagname)%> else <%foreach(requires)%> ifeq ($(<%require%>),1) <%endfor%> <%foreach(avoids)%> ifneq ($(<%avoid%>),1) <%endfor%> <%foreach(tagchecks)%> ifeq (<%tagcheck%>, $(findstring <%tagcheck%>, $(<%tagname%>))) <%endfor%> <%foreach(tagchecks)%> else LIB = SHLIB = endif <%endfor%> <%foreach(avoids)%> else LIB = SHLIB = all: avoid_warning endif <%endfor%> <%foreach(requires)%> else LIB = SHLIB = all: require_warning endif <%endfor%> endif <%endif%> <%endif%> <%if(exename)%> <%if(compname)%> CURRENT_COMPONENTS := $(shell sh $(ACE_ROOT)/bin/ace_components <%compname%>) <%endif%> <%foreach(requires)%> ifeq ($(<%require%>),1) <%endfor%> <%foreach(avoids)%> ifneq ($(<%avoid%>),1) <%endfor%> <%foreach(comps)%> ifeq (<%comp%>, $(findstring <%comp%>, $(CURRENT_COMPONENTS))) <%endfor%> BIN = $(BIN_UNCHECKED) <%foreach(comps)%> else all: comp_warning endif <%endfor%> <%foreach(avoids)%> else all: avoid_warning endif <%endfor%> <%foreach(requires)%> else all: require_warning endif <%endfor%> OBJS = $(addsuffix .o, $(notdir $(FILES))) SRC = $(addsuffix .cpp, $(FILES)) <%endif%> ifneq (,$(RC)) FILES += $(RESOURCES) endif <%if(sharedname || staticname)%> LSRC = $(addsuffix .cpp, $(FILES)) <%endif%> <%if(!comps)%> <%if(tagname)%> ifeq (,$(<%tagname%>)) <%endif%> <%if(grouped_source_files)%> BUILD += <%grouped_source_files->component_name%> <%endif%> <%if(tagname)%> else <%foreach(tagchecks)%> ifeq (<%tagcheck%>, $(findstring <%tagcheck%>, $(<%tagname%>))) <%endfor%> <%if(grouped_source_files)%> BUILD += <%grouped_source_files->component_name%> <%endif%> <%foreach(tagchecks)%> endif <%endfor%> endif <%endif%> <%else%> <%if(grouped_source_files)%> <%if(grouped_source_files->component_name)%> <%foreach(requires)%> ifeq ($(<%require%>),1) <%endfor%> <%foreach(avoids)%> ifneq ($(<%avoid%>),1) <%endfor%> <%foreach(comps)%> ifeq (<%comp%>, $(findstring <%comp%>, $(CURRENT_COMPONENTS))) <%endfor%> BUILD += <%grouped_source_files->component_name%> <%foreach(comps avoids requires)%> endif <%endfor%> <%endif%> <%endif%> <%endif%> <%if(idl_files)%> <%if(exename)%> ifneq ($(BIN),) <%else%> <%if(sharedname)%> ifneq ($(SHLIB),) <%else%> <%if(staticname)%> ifneq ($(LIB),) <%endif%> <%endif%> <%endif%> all: idl_stubs # This rule forces make to run the idl_stubs # target before building any of the source files. FORCED_IDL_STUBS = <%source_files%> <%if(exename)%> endif <%else%> <%if(sharedname)%> endif <%else%> <%if(staticname)%> endif <%endif%> <%endif%> <%endif%> <%endif%> <%marker(circuit)%> include $(ACE_ROOT)/include/makeinclude/macros.GNU include $(ACE_ROOT)/include/makeinclude/rules.common.GNU include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU <%if(install)%> INSTALL_CHECK = <%install%> ifeq ($(INSTALL_CHECK),) INSTALL = $(INSTALL_CHECK) else ifneq ($(INSTALL_CHECK),.) <%if(exename)%> INSBIN = $(INSTALL_CHECK) INSTALL = $(VBIN:%=$(INSBIN)/%$(EXEEXT)) CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(EXEEXT)) <%endif%> endif endif <%else%> <%if(!exename)%> INSTALL_CHECK = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%> ifeq ($(INSTALL_CHECK),.) ifeq ($(PWD),) PWD=$(shell pwd) endif INSLIB = $(PWD) else INSLIB = $(INSTALL_CHECK) endif <%endif%> <%endif%> <%if(sharedname || staticname)%> include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU <%endif%> include $(ACE_ROOT)/include/makeinclude/rules.local.GNU <%if(tao)%> include $(TAO_ROOT)/taoconfig.mk <%endif%> <%if(includes)%> CPPFLAGS +=<%foreach(includes)%> -I<%include%><%endfor%> <%endif%> <%if(macros)%> CPPFLAGS +=<%foreach(macros)%> -D<%macro%><%endfor%> <%endif%> <%if(idlpreprocessor)%> ifeq ($(TAO_IDL_PREPROCESSOR),) CPPFLAGS += -DTAO_IDL_PREPROCESSOR=\"$(strip $(CXX))\" else CPPFLAGS += -DTAO_IDL_PREPROCESSOR=\"$(subst \,\,$(TAO_IDL_PREPROCESSOR))\" endif <%endif%> <%if(dynamicflags)%> ifeq ($(shared_libs),1) ifneq ($(SHLIB),) CPPFLAGS +=<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%> endif endif <%endif%> <%if(staticflags)%> ifeq ($(static_libs),1) ifneq ($(LIB),) CPPFLAGS +=<%foreach(staticflags)%> -D<%staticflag%><%endfor%> endif endif <%endif%> <%if(libpaths)%> LDFLAGS +=<%foreach(libpaths)%> -L<%libpath%><%endfor%> <%endif%> <%if(idl_files)%> <%if(idlflags)%> TAO_IDLFLAGS += <%idlflags%> <%endif%> <%endif%> #---------------------------------------------------------------------------- # Local targets #---------------------------------------------------------------------------- <%marker(local)%> <%if(comps)%> comp_warning: @echo This project will not be built due to one of the following missing components: @echo<%foreach(comps)%> <%comp%><%endfor%> <%endif%> <%if(requires)%> require_warning: @echo This project will not be built due to one of the following missing features: @echo<%foreach(requires)%> <%require%><%endfor%> <%endif%> <%if(avoids)%> avoid_warning: @echo This project will not be built due to one of the following enabled features: @echo<%foreach(avoids)%> <%avoid%><%endfor%> <%endif%> <%if(custom_types)%> <%foreach(custom_types)%> <%if(custom_types->libpath)%> DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):<%custom_type->libpath%> LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):<%custom_type->libpath%> SHLIB_PATH := $(SHLIB_PATH):<%custom_type->libpath%> LIBPATH := $(LIBPATH):<%custom_type->libpath%> PATH := $(PATH):<%custom_type->libpath%> <%endif%> <%foreach(custom_type->input_files)%> <%if(custom_type->input_file->output_files)%> GENERATED_DIRTY +=<%foreach(custom_type->input_file->output_files)%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%endfor%> <%foreach(custom_type->input_file->output_files)%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>: <%custom_type->input_file%> <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%custom_type->input_file%> <%if(custom_type->output_option)%><%custom_type->output_option%> $@<%endif%> <%endfor%> <%endif%> <%endfor%> <%endfor%> ifneq ($(GENERATED_DIRTY),) .PRECIOUS: $(GENERATED_DIRTY) all: $(GENERATED_DIRTY) endif <%endif%> <%comptarget%> <%if(idl_files)%> <%foreach(idl_files)%> <%if(flag_overrides(idl_file, idlgendir))%> ADDITIONAL_IDL_TARGETS += <%flag_overrides(idl_file, idlgendir)%>/<%basenoextension(idl_file)%>C.h FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%flag_overrides(idl_file, idlgendir)%>/<%basenoextension(idl_file)%>C.cpp=) FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%flag_overrides(idl_file, idlgendir)%>/<%basenoextension(idl_file)%>S.cpp=) GENERATED_DIRTY += $(foreach ext, $(IDL_EXT), <%flag_overrides(idl_file, idlgendir)%>/<%basenoextension(idl_file)%>$(ext)) <%comment(The S.cpp was removed to avoid yet another problem with parallelism. It doesn't seem necessary since you can't get the S.cpp without the C.cpp)%> <%flag_overrides(idl_file, idlgendir)%>/<%basenoextension(idl_file)%>C.h <%flag_overrides(idl_file, idlgendir)%>/<%basenoextension(idl_file)%>C.cpp: <%idl_file%> $(TAO_IDL) -o <%flag_overrides(idl_file, idlgendir)%> <%if(flag_overrides(idl_file, idlflags))%><%flag_overrides(idl_file, idlflags)%><%else%>$(TAO_IDLFLAGS)<%endif%> <%idl_file%> <%else%> <%if(idlgendir)%> ADDITIONAL_IDL_TARGETS += <%idlgendir%>/<%basenoextension(idl_file)%>C.h FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%idlgendir%>/<%basenoextension(idl_file)%>C.cpp=) FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%idlgendir%>/<%basenoextension(idl_file)%>S.cpp=) GENERATED_DIRTY += $(foreach ext, $(IDL_EXT), <%idlgendir%>/<%basenoextension(idl_file)%>$(ext)) <%comment(The S.cpp was removed to avoid yet another problem with parallelism. It doesn't seem necessary since you can't get the S.cpp without the C.cpp)%> <%idlgendir%>/<%basenoextension(idl_file)%>C.h <%idlgendir%>/<%basenoextension(idl_file)%>C.cpp: <%idl_file%> $(TAO_IDL) -o <%idlgendir%> <%if(flag_overrides(idl_file, idlflags))%><%flag_overrides(idl_file, idlflags)%><%else%>$(TAO_IDLFLAGS)<%endif%> <%idl_file%> <%else%> # IDL File Directory: <%dirname(idl_file)%> <%if(dirname_found)%> ADDITIONAL_IDL_TARGETS += <%noextension(idl_file)%>C.h FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%dirname(idl_file)%>/<%noextension(idl_file)%>C.cpp=) FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%dirname(idl_file)%>/<%noextension(idl_file)%>S.cpp=) <%comment(The S.cpp was removed to avoid yet another problem with parallelism. It doesn't seem necessary since you can't get the S.cpp without the C.cpp)%> <%dirname(idl_file)%>/<%noextension(idl_file)%>C.h <%dirname(idl_file)%>/<%noextension(idl_file)%>C.cpp: <%idl_file%> $(TAO_IDL) -o <%dirname(idl_file)%> <%if(flag_overrides(idl_file, idlflags))%><%flag_overrides(idl_file, idlflags)%><%else%>$(TAO_IDLFLAGS)<%endif%> <%idl_file%> <%else%> <%if(flag_overrides(idl_file, idlflags))%> FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%noextension(idl_file)%>C.cpp=) FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%noextension(idl_file)%>S.cpp=) <%comment(The S.cpp was removed to avoid yet another problem with parallelism. It doesn't seem necessary since you can't get the S.cpp without the C.cpp)%> <%noextension(idl_file)%>C.h <%noextension(idl_file)%>C.cpp: <%idl_file%> $(TAO_IDL) <%flag_overrides(idl_file, idlflags)%> <%idl_file%> <%endif%> <%endif%> <%endif%> <%endif%> <%endfor%> ifneq ($(ADDITIONAL_IDL_TARGETS),) idl_stubs: $(ADDITIONAL_IDL_TARGETS) endif ifneq ($(FORCED_IDL_STUBS),) $(FORCED_IDL_STUBS): idl_stubs endif .PRECIOUS: $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext))) <%endif%> <%if(exename)%> ifndef kylix $(BIN): $(addprefix $(VDIR), $(OBJS)) $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) else $(BIN): $(addprefix $(VDIR), $(OBJS)) $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, endif <%endif%> realclean: clean <%compclean%> <%if(idl_files)%> -$(RM) $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext))) <%endif%> ifneq ($(GENERATED_DIRTY),) -$(RM) -r $(GENERATED_DIRTY) endif <%marker(bottom)%>