1
#----------------------------------------------------------------------------
4
# @file <%project_file%>
6
# gnu.mpd,v 1.65 2003/12/15 18:50:46 jwillemsen Exp
8
# This file was automatically generated by MPC. Any changes made directly to
9
# this file will be lost the next time it is generated.
11
#----------------------------------------------------------------------------
13
MAKEFILE = <%project_file%>
14
DEPENDENCY_FILE = .depend.<%project_file%>
16
BIN_UNCHECKED = <%exename%>
20
## LIB may be set to empty later on in this file
21
LIB_UNCHECKED = lib<%staticname%>.a
22
LIB = $(LIB_UNCHECKED)
29
## SHLIB may be set to empty later on in this file
30
SHLIB_UNCHECKED = lib<%sharedname%>.$(SOEXT)
31
SHLIB = $(SHLIB_UNCHECKED)
36
TAO_ROOT = $(ACE_ROOT)/TAO
39
CIAO_ROOT = $(TAO_ROOT)/CIAO
44
TAO_IDL = <%idl_compiler%>
45
IDL_FILES =<%foreach(idl_files)%> <%noextension(idl_file)%><%endfor%>
46
IDL_SRC = $(foreach ext, C.cpp S.cpp, $(foreach file, $(IDL_FILES), $(file)$(ext)))
49
<%if(grouped_source_files)%>
50
<%foreach(grouped_source_files)%>
51
<%grouped_source_file%> = \
52
<%foreach(grouped_source_file->files)%>
53
<%noextension(grouped_source_file->file)%><%fornotlast(" \\")%>
57
ifndef <%grouped_source_files->component_name%>
58
<%grouped_source_files->component_name%> = \
59
<%foreach(grouped_source_files)%>
60
<%grouped_source_file%><%fornotlast(" \\")%>
62
endif # <%grouped_source_files->component_name%>
64
<%foreach(grouped_source_files)%>
65
ifneq (,$(findstring <%grouped_source_file%>, $(<%grouped_source_files->component_name%>)))
66
FILES += $(<%grouped_source_file%>)
67
endif # <%grouped_source_file%>
72
<%foreach(source_files)%>
73
<%noextension(source_file)%><%fornotlast(" \\")%>
77
<%if(resource_files)%>
79
<%foreach(resource_files)%>
80
<%resource_file%><%fornotlast(" \\")%>
85
#----------------------------------------------------------------------------
86
# Include macros and targets
87
#----------------------------------------------------------------------------
90
LDLIBS =<%foreach(libs)%> -l<%lib%><%endfor%><%foreach(lit_libs)%> -l<%lit_lib%><%endfor%><%foreach(defaultlibs)%> -l<%defaultlib%><%endfor%>
93
ACE_SHLIBS =<%foreach(libs)%> -l<%lib%><%endfor%><%foreach(lit_libs)%> -l<%lit_lib%><%endfor%><%foreach(defaultlibs)%> -l<%defaultlib%><%endfor%>
96
include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
97
## We don't need the ACELIB setting from wrapper_macros.GNU
100
include $(TAO_ROOT)/rules.tao.GNU
103
# To build multiple executables in the same directory on AIX, it works
104
# best to have a template directory per project.
105
# The compiler/linker isn't too smart about instantiating templates...
107
TEMPINCDIR := $(TEMPINCDIR)/<%project_name%>
113
OUTPUT_DIRECTORY = <%if(install)%><%install%><%else%>.<%endif%>
115
OUTPUT_DIRECTORY = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%>
117
all: $(OUTPUT_DIRECTORY)
120
-@mkdir -p "$(OUTPUT_DIRECTORY)"
124
CURRENT_COMPONENTS := $(shell sh $(ACE_ROOT)/bin/ace_components <%compname%>)
126
<%foreach(requires)%>
127
ifeq ($(<%require%>),1)
130
ifneq ($(<%avoid%>),1)
133
ifeq (<%comp%>, $(findstring <%comp%>, $(CURRENT_COMPONENTS)))
157
<%foreach(requires)%>
170
ifeq (,$(<%tagname%>))
172
<%foreach(requires)%>
173
ifeq ($(<%require%>),1)
176
ifneq ($(<%avoid%>),1)
189
<%foreach(requires)%>
202
<%foreach(requires)%>
203
ifeq ($(<%require%>),1)
206
ifneq ($(<%avoid%>),1)
208
<%foreach(tagchecks)%>
209
ifeq (<%tagcheck%>, $(findstring <%tagcheck%>, $(<%tagname%>)))
211
<%foreach(tagchecks)%>
224
<%foreach(requires)%>
237
CURRENT_COMPONENTS := $(shell sh $(ACE_ROOT)/bin/ace_components <%compname%>)
239
<%foreach(requires)%>
240
ifeq ($(<%require%>),1)
243
ifneq ($(<%avoid%>),1)
246
ifeq (<%comp%>, $(findstring <%comp%>, $(CURRENT_COMPONENTS)))
248
BIN = $(BIN_UNCHECKED)
259
<%foreach(requires)%>
265
OBJS = $(addsuffix .o, $(notdir $(FILES)))
266
SRC = $(addsuffix .cpp, $(FILES))
269
FILES += $(RESOURCES)
272
<%if(sharedname || staticname)%>
273
LSRC = $(addsuffix .cpp, $(FILES))
277
ifeq (,$(<%tagname%>))
279
<%if(grouped_source_files)%>
280
BUILD += <%grouped_source_files->component_name%>
284
<%foreach(tagchecks)%>
285
ifeq (<%tagcheck%>, $(findstring <%tagcheck%>, $(<%tagname%>)))
287
<%if(grouped_source_files)%>
288
BUILD += <%grouped_source_files->component_name%>
290
<%foreach(tagchecks)%>
296
<%if(grouped_source_files)%>
297
<%if(grouped_source_files->component_name)%>
298
<%foreach(requires)%>
299
ifeq ($(<%require%>),1)
302
ifneq ($(<%avoid%>),1)
305
ifeq (<%comp%>, $(findstring <%comp%>, $(CURRENT_COMPONENTS)))
307
BUILD += <%grouped_source_files->component_name%>
308
<%foreach(comps avoids requires)%>
329
# This rule forces make to run the idl_stubs
330
# target before building any of the source files.
331
FORCED_IDL_STUBS = <%source_files%>
346
include $(ACE_ROOT)/include/makeinclude/macros.GNU
347
include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
348
include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
351
INSTALL_CHECK = <%install%>
352
ifeq ($(INSTALL_CHECK),)
353
INSTALL = $(INSTALL_CHECK)
355
ifneq ($(INSTALL_CHECK),.)
357
INSBIN = $(INSTALL_CHECK)
358
INSTALL = $(VBIN:%=$(INSBIN)/%$(EXEEXT))
359
CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(EXEEXT))
366
INSTALL_CHECK = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%>
367
ifeq ($(INSTALL_CHECK),.)
373
INSLIB = $(INSTALL_CHECK)
378
<%if(sharedname || staticname)%>
379
include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
381
include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
383
include $(TAO_ROOT)/taoconfig.mk
387
CPPFLAGS +=<%foreach(includes)%> -I<%include%><%endfor%>
390
CPPFLAGS +=<%foreach(macros)%> -D<%macro%><%endfor%>
392
<%if(idlpreprocessor)%>
393
ifeq ($(TAO_IDL_PREPROCESSOR),)
394
CPPFLAGS += -DTAO_IDL_PREPROCESSOR=\"$(strip $(CXX))\"
396
CPPFLAGS += -DTAO_IDL_PREPROCESSOR=\"$(subst \,\,$(TAO_IDL_PREPROCESSOR))\"
400
ifeq ($(shared_libs),1)
402
CPPFLAGS +=<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%>
407
ifeq ($(static_libs),1)
409
CPPFLAGS +=<%foreach(staticflags)%> -D<%staticflag%><%endfor%>
416
LDFLAGS +=<%foreach(libpaths)%> -L<%libpath%><%endfor%>
421
TAO_IDLFLAGS += <%idlflags%>
424
#----------------------------------------------------------------------------
426
#----------------------------------------------------------------------------
430
@echo This project will not be built due to one of the following missing components:
431
@echo<%foreach(comps)%> <%comp%><%endfor%>
436
@echo This project will not be built due to one of the following missing features:
437
@echo<%foreach(requires)%> <%require%><%endfor%>
442
@echo This project will not be built due to one of the following enabled features:
443
@echo<%foreach(avoids)%> <%avoid%><%endfor%>
447
<%foreach(custom_types)%>
448
<%if(custom_types->libpath)%>
449
DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):<%custom_type->libpath%>
450
LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):<%custom_type->libpath%>
451
SHLIB_PATH := $(SHLIB_PATH):<%custom_type->libpath%>
452
LIBPATH := $(LIBPATH):<%custom_type->libpath%>
453
PATH := $(PATH):<%custom_type->libpath%>
456
<%foreach(custom_type->input_files)%>
457
<%if(custom_type->input_file->output_files)%>
458
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%>
459
<%foreach(custom_type->input_file->output_files)%>
460
<%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%>
461
<%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%>
467
ifneq ($(GENERATED_DIRTY),)
468
.PRECIOUS: $(GENERATED_DIRTY)
469
all: $(GENERATED_DIRTY)
476
<%foreach(idl_files)%>
477
<%if(flag_overrides(idl_file, idlgendir))%>
478
ADDITIONAL_IDL_TARGETS += <%flag_overrides(idl_file, idlgendir)%>/<%basenoextension(idl_file)%>C.h
479
FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%flag_overrides(idl_file, idlgendir)%>/<%basenoextension(idl_file)%>C.cpp=)
480
FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%flag_overrides(idl_file, idlgendir)%>/<%basenoextension(idl_file)%>S.cpp=)
481
GENERATED_DIRTY += $(foreach ext, $(IDL_EXT), <%flag_overrides(idl_file, idlgendir)%>/<%basenoextension(idl_file)%>$(ext))
482
<%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)%>
483
<%flag_overrides(idl_file, idlgendir)%>/<%basenoextension(idl_file)%>C.h <%flag_overrides(idl_file, idlgendir)%>/<%basenoextension(idl_file)%>C.cpp: <%idl_file%>
484
$(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%>
487
ADDITIONAL_IDL_TARGETS += <%idlgendir%>/<%basenoextension(idl_file)%>C.h
488
FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%idlgendir%>/<%basenoextension(idl_file)%>C.cpp=)
489
FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%idlgendir%>/<%basenoextension(idl_file)%>S.cpp=)
490
GENERATED_DIRTY += $(foreach ext, $(IDL_EXT), <%idlgendir%>/<%basenoextension(idl_file)%>$(ext))
491
<%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)%>
492
<%idlgendir%>/<%basenoextension(idl_file)%>C.h <%idlgendir%>/<%basenoextension(idl_file)%>C.cpp: <%idl_file%>
493
$(TAO_IDL) -o <%idlgendir%> <%if(flag_overrides(idl_file, idlflags))%><%flag_overrides(idl_file, idlflags)%><%else%>$(TAO_IDLFLAGS)<%endif%> <%idl_file%>
495
# IDL File Directory: <%dirname(idl_file)%>
496
<%if(dirname_found)%>
497
ADDITIONAL_IDL_TARGETS += <%noextension(idl_file)%>C.h
498
FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%dirname(idl_file)%>/<%noextension(idl_file)%>C.cpp=)
499
FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%dirname(idl_file)%>/<%noextension(idl_file)%>S.cpp=)
500
<%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)%>
501
<%dirname(idl_file)%>/<%noextension(idl_file)%>C.h <%dirname(idl_file)%>/<%noextension(idl_file)%>C.cpp: <%idl_file%>
502
$(TAO_IDL) -o <%dirname(idl_file)%> <%if(flag_overrides(idl_file, idlflags))%><%flag_overrides(idl_file, idlflags)%><%else%>$(TAO_IDLFLAGS)<%endif%> <%idl_file%>
504
<%if(flag_overrides(idl_file, idlflags))%>
505
FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%noextension(idl_file)%>C.cpp=)
506
FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%noextension(idl_file)%>S.cpp=)
507
<%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)%>
508
<%noextension(idl_file)%>C.h <%noextension(idl_file)%>C.cpp: <%idl_file%>
509
$(TAO_IDL) <%flag_overrides(idl_file, idlflags)%> <%idl_file%>
516
ifneq ($(ADDITIONAL_IDL_TARGETS),)
517
idl_stubs: $(ADDITIONAL_IDL_TARGETS)
520
ifneq ($(FORCED_IDL_STUBS),)
521
$(FORCED_IDL_STUBS): idl_stubs
524
.PRECIOUS: $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext)))
529
$(BIN): $(addprefix $(VDIR), $(OBJS))
530
$(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK)
532
$(BIN): $(addprefix $(VDIR), $(OBJS))
533
$(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,,
537
realclean: clean <%compclean%>
539
-$(RM) $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext)))
541
ifneq ($(GENERATED_DIRTY),)
542
-$(RM) -r $(GENERATED_DIRTY)