diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/Makefile | 14 | ||||
-rw-r--r-- | cpp/README.rhel3 | 15 | ||||
-rw-r--r-- | cpp/options-rhel3.mk | 20 | ||||
-rw-r--r-- | cpp/options.mk | 9 | ||||
-rw-r--r-- | cpp/src/qpid/framing/amqp_types.h | 2 |
5 files changed, 56 insertions, 4 deletions
diff --git a/cpp/Makefile b/cpp/Makefile index 765e911ebb..d9ffb9919d 100644 --- a/cpp/Makefile +++ b/cpp/Makefile @@ -26,6 +26,14 @@ include options.mk test: unittest pythontest +.PHONY: show-vars +show-vars: + @echo APR_LDFLAGS=$(APR_LDFLAGS) + @echo APR_CFLAGS=$(APR_CFLAGS) + @echo CXXFLAGS=$(CXXFLAGS) + @echo LDFLAGS=$(LDFLAGS) + @echo CXX=$(CXX) + # Must run two separate make processes to pick up generated files. all: $(MAKE) generate @@ -106,10 +114,14 @@ endef $(foreach dir,$(SRCDIRS),$(eval $(call CPPRULE,$(dir)))) +ifndef CPPUNIT_LDFLAGS + CPPUNIT_LDFLAGS := -lcppunit +endif + # Unit test plugin libraries. $(TESTDIR)/%Test.so: test/unit/%Test.cpp $(LIB_common) $(LIB_broker) mkdir -p $(dir $@) - $(CXX) -shared -o $@ $< $(CXXFLAGS) -Itest/include $(LDFLAGS) -lcppunit $(LIB_common) $(LIB_broker) + $(CXX) -shared -o $@ $< $(CXXFLAGS) -Itest/include $(LDFLAGS) $(CPPUNIT_LDFLAGS) $(LIB_common) $(LIB_broker) # Client test programs $(TESTDIR)/%: test/client/%.cpp $(LIB_common) $(LIB_client) diff --git a/cpp/README.rhel3 b/cpp/README.rhel3 new file mode 100644 index 0000000000..17e0c0ed87 --- /dev/null +++ b/cpp/README.rhel3 @@ -0,0 +1,15 @@ +Building on RHEL3 without access to root (i.e. no yum) +====================================================== + +Install make-3.80 into ~/local/make-3.80 + +Install apr-1.2.7 into ~/local/apr-1.2.7. + +Install boost-1.33.1 into ~/local/boost-1.33.1 + +Install cppunit-1.11.4 into ~/local/cppunit-1.11.4 + +Build using the following command: + + $ ./build.rhel3 + diff --git a/cpp/options-rhel3.mk b/cpp/options-rhel3.mk new file mode 100644 index 0000000000..c84cab94b1 --- /dev/null +++ b/cpp/options-rhel3.mk @@ -0,0 +1,20 @@ +# +# Expects dependencies in ~/local +# + +RELEASE := 1 + +# Configure Boost. +BOOST_CXXFLAGS := -I$(HOME)/local/boost-1.33.1/include/boost-1_33_1 +CXXFLAGS := $(CXXFLAGS) $(BOOST_CXXFLAGS) + +# Configure CppUnit. +CPPUNIT_CFLAGS := `cppunit-config --cflags` +CPPUNIT_LDFLAGS := `cppunit-config --libs` +CXXFLAGS := $(CXXFLAGS) $(CPPUNIT_CFLAGS) + +# +# RedHat Enterprise 3 g++ can't handle -Wextra etc so remove them. +# + +WARN := -Werror -pedantic -Wall -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wno-system-headers diff --git a/cpp/options.mk b/cpp/options.mk index 351f4bdefd..9fd966ad6a 100644 --- a/cpp/options.mk +++ b/cpp/options.mk @@ -36,8 +36,10 @@ endif ifdef USE_APR PLATFORM := apr IGNORE := posix -CXXFLAGS := $(CXXFLAGS) -DUSE_APR -I$(shell apr-1-config --includedir) -LDFLAGS := $(LDFLAGS) -L/usr/local/apr/lib -lapr-1 +APR_LDFLAGS := $(shell apr-1-config --link-ld --libs) +APR_CFLAGS := -DUSE_APR -I$(shell apr-1-config --includedir) +CXXFLAGS := $(CXXFLAGS) $(APR_CFLAGS) +LDFLAGS := $(LDFLAGS) $(APR_LDFLAGS) else PLATFORM := posix IGNORE := apr @@ -72,7 +74,9 @@ EXTRA_LIBDIRS := # -Wunreachable-code -Wpadded -Winline # -Wshadow - warns about boost headers. # +ifndef WARN WARN := -Werror -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers +endif INCLUDES := $(SRCDIRS:%=-I%) $(EXTRA_INCLUDES) LDFLAGS := $(LDFLAGS) -L$(LIBDIR) @@ -90,3 +94,4 @@ LIBFILE =$(CURDIR)/$(LIBDIR)/libqpid_$1.so.$2 LIB_COMMAND = mkdir -p $(dir $@) && $(CXX) -shared -o $@ $(LDFLAGS) $(CXXFLAGS) $^ +-include options-local-override.mk diff --git a/cpp/src/qpid/framing/amqp_types.h b/cpp/src/qpid/framing/amqp_types.h index f3bc03ca24..e576c79baf 100644 --- a/cpp/src/qpid/framing/amqp_types.h +++ b/cpp/src/qpid/framing/amqp_types.h @@ -27,7 +27,7 @@ typedef unsigned int u_int32_t; typedef unsigned __int64 u_int64_t; #endif #ifndef _WINDOWS -#include "sys/types.h" +#include "stdint.h" #endif #ifndef AMQP_TYPES_H |