summaryrefslogtreecommitdiff
path: root/bin/MakeProjectCreator/templates/gnu.mpd
blob: c922e6f87c18c4271abdaf459a97b0de68d6faf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#----------------------------------------------------------------------------
#       GNU Makefile
#----------------------------------------------------------------------------

MAKEFILE        = <%project_file%>
DEPENDENCY_FILE = .depend.<%project_file%>
<%if(exename)%>
BIN             = <%exename%>
<%endif%>
<%if(staticname)%>
LIB             = lib<%staticname%>.a
<%endif%>
<%if(sharedname)%>
SHLIB           = lib<%sharedname%>.$(SOEXT)
<%endif%>
<%if(tao)%>

ifndef TAO_ROOT
  TAO_ROOT = $(ACE_ROOT)/TAO
endif
<%endif%>
<%if(idl_files)%>

IDL_FILES =<%foreach(idl_files)%> <%noextension(idl_file)%><%endfor%>
IDL_SRC = $(foreach ext, C.cpp S.cpp, $(foreach file, $(IDL_FILES), $(file)$(ext)))
<%endif%>

<%gnu_source_files%>

#----------------------------------------------------------------------------
#       Include macros and targets
#----------------------------------------------------------------------------
include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
<%if(tao)%>
include $(TAO_ROOT)/rules.tao.GNU
<%endif%>

<%if(exename)%>
OBJS   = $(addsuffix .o, $(notdir $(FILES)))
SRC    = $(addsuffix .cpp,$(FILES))
<%endif%>
<%if(sharedname)%>
LSRC   = $(addsuffix .cpp,$(FILES))
<%endif%>
ACELIB =<%foreach(defaultlibs)%> -l<%defaultlib%><%endfor%>

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
<%if(exename)%>
  INSBIN  = $(INSTALL_CHECK)
  INSTALL = $(VBIN:%=$(INSBIN)/%$(EXEEXT))
<%endif%>
<%if(sharedname)%>
  INSLIB  = $(INSTALL_CHECK)
<%endif%>
endif
<%endif%>
<%if(sharedname)%>
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(idlpreprocessor)%>
ifeq ($(TAO_IDL_PREPROCESSOR),)
  CPPFLAGS += -DTAO_IDL_PREPROCESSOR=\"$(strip $(CXX))\"
else
  CPPFLAGS += -DTAO_IDL_PREPROCESSOR=\"$(subst \,\,$(TAO_IDL_PREPROCESSOR))\"
endif
<%endif%>
<%if(libpaths)%>
LDFLAGS      +=<%foreach(libpaths)%> -L<%libpath%><%endfor%>
<%endif%>
<%if(idl_files)%>
<%if(idlflags)%>
TAO_IDLFLAGS += <%idlflags%>
<%endif%>
<%endif%>
<%if(libs)%>

<%if(exename)%>LDLIBS<%endif%><%if(sharedname)%>ACE_SHLIBS<%endif%> =<%foreach(libs)%> -l<%lib%><%endfor%>
<%endif%>
<%if(ssl)%>
<%if(exename)%>LDLIBS<%endif%><%if(sharedname)%>ACE_SHLIBS<%endif%> +=<%foreach(ssl_libs)%> -l<%ssl_lib%><%endfor%>
<%endif%>

#----------------------------------------------------------------------------
#       Local targets
#----------------------------------------------------------------------------
<%if(idl_files)%>

all: idl_stubs

.PRECIOUS: $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext)))
<%endif%>
<%if(exename)%>

$(BIN): $(addprefix $(VDIR), $(OBJS))
	$(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK)
<%endif%>
<%if(idl_files)%>

realclean: clean
	-$(RM) $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext)))
<%endif%>

#----------------------------------------------------------------------------
#       Dependencies
#----------------------------------------------------------------------------
# DO NOT DELETE THIS LINE -- g++dep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.

# IF YOU PUT ANYTHING HERE IT WILL GO AWAY