activemq/openwire-cpp/makefile.cfg

138 lines
3.5 KiB
INI

## ---------------------------------------------------------------------------
## Licensed to the Apache Software Foundation (ASF) under one or more
## contributor license agreements. See the NOTICE file distributed with
## this work for additional information regarding copyright ownership.
## The ASF licenses this file to You under the Apache License, Version 2.0
## (the "License"); you may not use this file except in compliance with
## the License. You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
## ---------------------------------------------------------------------------
CURRENT = $(PWD)
# --- select compiler for structure
# ----------------------------------------------------------
include $(MAKE_HOME)/makefile-$(OSTYPE)-$(CONFIG).cfg
# --- set generic commmands
# ----------------------------------------------------------
MV = mv
RM = rm -f
RMR = rm -rf
CP = cp -p
LN = ln -s
LS = ls
CAT = cat
MD = mkdir
AR = ar -r
PURIFY = purify
ECHO = echo
TOUCH = touch
CD = cd
STRIP = strip
# --- set default targets and their handling procedures
# ----------------------------------------------------------
.SILENT:
.KEEP_STATE:
.SUFFIXES:
.SUFFIXES: .cpp .CC
.INIT:
$(ECHO) " -<>- Compiling "$(CURRENT)
.DONE:
$(ECHO) " -<>- Done"
.FAILED:
$(ECHO) " *** Compilation of $(CURRENT) Failed"
$(OUTDIR)/%.o: $(SRCDIR)/%.cpp $(SRCDIR)/%.hpp
$(ECHO) " - "$(CC) "'"$<"'"
$(CC) -o $@ $(DEFINES) $(CCFLAGS) -I$(SRCDIR) \
$(LOCAL_INCLUDE) -c $<
$(OUTDIR)/%.o: $(TSTDIR)/%.cpp $(TSTDIR)/%.hpp
$(ECHO) " - "$(CC) "'"$<"'"
$(CC) -o $@ $(DEFINES) $(CCFLAGS) -I$(SRCDIR) -I$(TSTDIR) \
$(LOCAL_INCLUDE) -c $<
# --- set generic targets and their handling procedures
# ----------------------------------------------------------
all: default
default: \
prepare \
$(OUTLIB) \
postpare
test: \
prepare \
$(OUTEXE) \
postpare
$(OUTLIB): $(LIBOFILES) $(DEPLIBS)
$(ECHO) " - Creating static library file "$@
$(AR) $(ARFLAGS) $@ $(LIBOFILES)
$(OUTEXE): $(OUTLIB) $(EXEOFILES)
$(ECHO) " - Creating test executable file "$(OUTEXE)
$(LD) $(LDFLAGS) -o $@ -L$(OUTDIR) $(EXEOFILES) $(EXELIBS)
clean:
$(ECHO) " - Cleaning up local directory "$(CURRENT)
$(ECHO) " - Removing object files"
$(RM) $(LIBOFILES)
$(RM) $(EXEOFILES)
$(ECHO) " - Removing file "$(OUTLIB)
$(RM) $(OUTLIB)
$(ECHO) " - Removing file "$(OUTEXE)
$(RM) $(OUTEXE)
$(RM) *~ *%
$(RM) #*
$(RM) core
$(RM) a.out
prepare:
if test ! -d $(OUTDIR) ; \
then \
$(MD) $(OUTDIR); \
$(MD) $(OUTDIR)/activemq; \
$(MD) $(OUTDIR)/activemq/command; \
$(MD) $(OUTDIR)/activemq/protocol; \
$(MD) $(OUTDIR)/activemq/protocol/openwire; \
$(MD) $(OUTDIR)/activemq/transport; \
$(MD) $(OUTDIR)/activemq/transport/tcp; \
$(MD) $(OUTDIR)/cms; \
$(MD) $(OUTDIR)/ppr; \
$(MD) $(OUTDIR)/ppr/io; \
$(MD) $(OUTDIR)/ppr/io/encoding; \
$(MD) $(OUTDIR)/ppr/net; \
$(MD) $(OUTDIR)/ppr/thread; \
$(MD) $(OUTDIR)/ppr/util; \
fi
postpare:
$(ECHO) "Done."