summaryrefslogtreecommitdiff
path: root/TAO/CIAO/CCF/External/Utility/Config/Archive.gcc.post.rules
blob: b43e4d013634424ffc473fcd4a36f8697b55be34 (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
# file      : Config/Archive.gcc.post.rules
# author    : Boris Kolpackov <boris@kolpackov.net>
# copyright : Copyright (c) 2002-2003 Boris Kolpackov
# license   : http://kolpackov.net/license.html


#
# Note: normally you wouldn't want to change anything below.
#

FULL_MODULE_PREFIX := $(MODULE_PREFIX)$(module_prefix)
FULL_MODULE_SUFFIX := $(module_suffix)$(MODULE_SUFFIX)
MODULE             := $(FULL_MODULE_PREFIX)$(module_base)$(FULL_MODULE_SUFFIX)

#
# Pattern rules catalog.
# {

# Defined pattern rule to build .o from .cpp
%.o : %.cpp
	$(CXX) $(CXX_PREPROCESS_FLAGS) $(CXX_COMPILE_FLAGS) -MD -MP -MT $(@:.o=.d) -MF $(@:.o=.d) -c $< -o $@

# Defines pattern rule to build <module> from <module>.o
$(MODULE_PREFIX)$(module_prefix)%$(module_suffix)$(MODULE_SUFFIX) : %.o
	$(AR) $(AR_FLAGS) $@ $^

# }

# Defines the rule to build module from tarnslated c++ translation units.
$(MODULE) : $(cxx_translation_units:.cpp=.o)

# Defines a phony target to clean all what's been generated
.PHONY : clean
clean :
	-rm -f $(cxx_translation_units:.cpp=.o)
	-rm -f $(cxx_translation_units:.cpp=.d)
	-rm -f $(MODULE)
	-rm -f *~

# Include dependencies for c++ translation units.
-include $(cxx_translation_units:.cpp=.d)


# The following catch-all rule will skip unknown targets
%:: ;@: