2006-07-03 07:51:36 -04:00
|
|
|
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)
|
|
|
|
|
2006-07-21 07:36:09 -04:00
|
|
|
$(TESTEXE): $(OTESTFILES)
|
2006-07-03 07:51:36 -04:00
|
|
|
$(LD) -o $@ $(OTESTFILES) $(LDFLAGS)
|
|
|
|
$(ECHO) 'Finished building target: $@'
|
|
|
|
|
2006-07-21 07:36:09 -04:00
|
|
|
$(INTEGRATIONEXE): $(OINTEGRATIONFILES)
|
2006-07-03 07:51:36 -04:00
|
|
|
$(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; \
|
2006-07-21 07:36:09 -04:00
|
|
|
$(MD) $(OUTDIR)/test-integration/integration/various; \
|
2006-07-03 07:51:36 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
done:
|
|
|
|
$(ECHO) "Done."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|