activemq/activemq-cpp/makefile.cfg

198 lines
5.6 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 $(MAKESUPPORT_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)/main/%.o: $(SRCDIR)/main/%.cpp
$(ECHO) " - "$(CC) "'"$<"'"
$(CC) -o $@ $(DEFINES) $(CCFLAGS) -I$(SRCDIR)/main \
$(LOCAL_INCLUDE) -c $<
$(OUTDIR)/test/%.o: $(SRCDIR)/test/%.cpp
$(ECHO) " - "$(CC) "'"$<"'"
$(CC) -o $@ $(DEFINES) $(CCFLAGS) -I$(SRCDIR)/main -I$(SRCDIR)/test \
$(LOCAL_INCLUDE) -c $<
$(OUTDIR)/test-integration/%.o: $(SRCDIR)/test-integration/%.cpp
$(ECHO) " - "$(CC) "'"$<"'"
$(CC) -o $@ $(DEFINES) $(CCFLAGS) -I$(SRCDIR)/main -I$(SRCDIR)/test-integration \
$(LOCAL_INCLUDE) -c $<
# --- set generic targets and their handling procedures
# ----------------------------------------------------------
lib: \
prepare \
$(OFILES) \
$(LIBFILE) \
done
test: \
prepare_test \
$(OTESTFILES) \
$(TESTEXE) \
done
integration: \
prepare_integration \
$(OINTEGRATIONFILES) \
$(INTEGRATIONEXE) \
done
all: lib test integration
default: all
$(LIBFILE): $(OFILES) $(DEPLIBS)
$(ECHO) " - Creating static library file "$@
$(AR) $(ARFLAGS) $@ $(OFILES)
$(TESTEXE): $(OTESTFILES)
$(LD) -o $@ $(OTESTFILES) $(LDFLAGS)
$(ECHO) 'Finished building target: $@'
$(INTEGRATIONEXE): $(OINTEGRATIONFILES)
$(LD) -o $@ $(OINTEGRATIONFILES) $(LDFLAGS)
$(ECHO) 'Finished building target: $@'
clean:
$(ECHO) " - Cleaning up local directory "$(CURRENT)
$(ECHO) " - Removing object files"
$(RM) $(OFILES)
$(ECHO) " - Removing file "$(LIBFILE)
$(RM) -rf $(OUTDIR)
$(RM) $(LIBFILE)
$(RM) *~ *%
$(RM) #*
$(RM) core
$(RM) a.out
prepare:
if test ! -d $(OUTDIR) ; \
then \
$(MD) $(OUTDIR); \
$(MD) $(OUTDIR)/main; \
$(MD) $(OUTDIR)/main/activemq; \
$(MD) $(OUTDIR)/main/activemq/exceptions; \
$(MD) $(OUTDIR)/main/activemq/commands; \
$(MD) $(OUTDIR)/main/activemq/connector; \
$(MD) $(OUTDIR)/main/activemq/connector/stomp; \
$(MD) $(OUTDIR)/main/activemq/connector/stomp/commands; \
$(MD) $(OUTDIR)/main/activemq/connector/stomp/marshal; \
$(MD) $(OUTDIR)/main/activemq/core; \
$(MD) $(OUTDIR)/main/activemq/io; \
$(MD) $(OUTDIR)/main/activemq/logger; \
$(MD) $(OUTDIR)/main/activemq/network; \
$(MD) $(OUTDIR)/main/activemq/util; \
$(MD) $(OUTDIR)/main/activemq/support; \
$(MD) $(OUTDIR)/main/activemq/concurrent; \
$(MD) $(OUTDIR)/main/activemq/transport; \
fi
prepare_test:
if test ! -d $(OUTDIR) ; \
then \
$(MD) $(OUTDIR); \
fi
if test ! -d $(OUTDIR)/test ; \
then \
$(MD) $(OUTDIR)/test; \
$(MD) $(OUTDIR)/test/activemq; \
$(MD) $(OUTDIR)/test/activemq/exceptions; \
$(MD) $(OUTDIR)/test/activemq/commands; \
$(MD) $(OUTDIR)/test/activemq/connector; \
$(MD) $(OUTDIR)/test/activemq/connector/stomp; \
$(MD) $(OUTDIR)/test/activemq/connector/stomp/commands; \
$(MD) $(OUTDIR)/test/activemq/connector/stomp/marshal; \
$(MD) $(OUTDIR)/test/activemq/core; \
$(MD) $(OUTDIR)/test/activemq/io; \
$(MD) $(OUTDIR)/test/activemq/logger; \
$(MD) $(OUTDIR)/test/activemq/network; \
$(MD) $(OUTDIR)/test/activemq/util; \
$(MD) $(OUTDIR)/test/activemq/concurrent; \
$(MD) $(OUTDIR)/test/activemq/transport; \
fi
prepare_integration:
if test ! -d $(OUTDIR) ; \
then \
$(MD) $(OUTDIR); \
fi
if test ! -d $(OUTDIR)/test-integration ; \
then \
$(MD) $(OUTDIR)/test-integration; \
$(MD) $(OUTDIR)/test-integration/integration; \
$(MD) $(OUTDIR)/test-integration/integration/common; \
$(MD) $(OUTDIR)/test-integration/integration/simple; \
$(MD) $(OUTDIR)/test-integration/integration/transactional; \
$(MD) $(OUTDIR)/test-integration/integration/durable; \
$(MD) $(OUTDIR)/test-integration/integration/various; \
fi
done:
$(ECHO) "Done."