2006-04-27 17:59:28 -04:00
|
|
|
CURRENT = $(PWD)
|
|
|
|
|
|
|
|
# --- select compiler for structure
|
|
|
|
# ----------------------------------------------------------
|
|
|
|
|
2006-05-15 09:38:57 -04:00
|
|
|
include $(MAKE_HOME)/makefile-$(OSTYPE)-$(CONFIG).cfg
|
2006-04-27 17:59:28 -04:00
|
|
|
|
|
|
|
# --- 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 $<
|
|
|
|
|
2006-05-15 09:38:57 -04:00
|
|
|
$(OUTDIR)/%.o: $(TSTDIR)/%.cpp $(TSTDIR)/%.hpp
|
|
|
|
$(ECHO) " - "$(CC) "'"$<"'"
|
|
|
|
$(CC) -o $@ $(DEFINES) $(CCFLAGS) -I$(SRCDIR) -I$(TSTDIR) \
|
|
|
|
$(LOCAL_INCLUDE) -c $<
|
|
|
|
|
2006-04-27 17:59:28 -04:00
|
|
|
# --- set generic targets and their handling procedures
|
|
|
|
# ----------------------------------------------------------
|
|
|
|
|
|
|
|
all: default
|
|
|
|
|
|
|
|
default: \
|
|
|
|
prepare \
|
|
|
|
$(OUTLIB) \
|
|
|
|
postpare
|
|
|
|
|
2006-05-15 09:38:57 -04:00
|
|
|
test: \
|
|
|
|
prepare \
|
|
|
|
$(OUTEXE) \
|
|
|
|
postpare
|
|
|
|
|
|
|
|
|
2006-04-27 17:59:28 -04:00
|
|
|
$(OUTLIB): $(LIBOFILES) $(DEPLIBS)
|
|
|
|
$(ECHO) " - Creating static library file "$@
|
|
|
|
$(AR) $(ARFLAGS) $@ $(LIBOFILES)
|
|
|
|
|
2006-05-15 09:38:57 -04:00
|
|
|
$(OUTEXE): $(OUTLIB) $(EXEOFILES)
|
|
|
|
$(ECHO) " - Creating test executable file "$(OUTEXE)
|
|
|
|
$(LD) $(LDFLAGS) -o $@ -L$(OUTDIR) $(EXEOFILES) $(EXELIBS)
|
2006-04-27 17:59:28 -04:00
|
|
|
|
|
|
|
clean:
|
|
|
|
$(ECHO) " - Cleaning up local directory "$(CURRENT)
|
|
|
|
$(ECHO) " - Removing object files"
|
|
|
|
$(RM) $(LIBOFILES)
|
2006-05-15 09:38:57 -04:00
|
|
|
$(RM) $(EXEOFILES)
|
2006-04-27 17:59:28 -04:00
|
|
|
$(ECHO) " - Removing file "$(OUTLIB)
|
|
|
|
$(RM) $(OUTLIB)
|
2006-05-15 09:38:57 -04:00
|
|
|
$(ECHO) " - Removing file "$(OUTEXE)
|
|
|
|
$(RM) $(OUTEXE)
|
2006-04-27 17:59:28 -04:00
|
|
|
$(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; \
|
2006-05-15 09:38:57 -04:00
|
|
|
$(MD) $(OUTDIR)/ppr/io/encoding; \
|
2006-04-27 17:59:28 -04:00
|
|
|
$(MD) $(OUTDIR)/ppr/net; \
|
|
|
|
$(MD) $(OUTDIR)/ppr/thread; \
|
|
|
|
$(MD) $(OUTDIR)/ppr/util; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
postpare:
|
|
|
|
$(ECHO) "Done."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|