Commit 4c840dac authored by neverlord's avatar neverlord

Makefile changes

parent 55a6d133
......@@ -9,3 +9,4 @@ queue_test
cppa.creator.user.1.3
8threads
4threads
libcppa.Makefile
# the used GCC binary
CXX = /opt/local/bin/g++-mp-4.6
# compiler flags
#CXXFLAGS = -std=c++0x -pedantic -Wall -Wextra -O2 -I/opt/local/include/ -fpermissive
CXXFLAGS = -std=c++0x -pedantic -Wall -Wextra -g -O0 -I/opt/local/include/ -fpermissive
# external libraries
LIBS = -L/opt/local/lib -lboost_thread-mt
# external include directories
INCLUDES =
Homepage: http://libcppa.blogspot.com/
Blog: http://libcppa.blogspot.com
This project is in a very early / experimental stage.
This project is in an early / experimental stage.
It makes use of variadic templates, type inference and other features not included in the current language specification for C++.
The only compiler known to work for the given sources is GCC in version >= 4.5.
It makes use of variadic templates, unrestricted unions, type inference and
other features not included in the current language specification for C++.
Thus, GCC in version >= 4.6 is required to compile libcppa.
To compile the sources, you need to modify the Makefile by hand and set the path to your GCC binary.
You can modify the file "Makefile.rules" to set the path to your GCC binary
and/or to compile libcppa with different compiler flags.
......@@ -25,8 +25,14 @@ append_hpp_from "cppa/util"
append_cpp_from "src"
if test "$(uname)" = "Darwin"; then
LIB_NAME="libcppa.dylib"
else
LIB_NAME="libcppa.so"
fi
echo "include Makefile.rules"
echo "INCLUDES = -I./"
echo "INCLUDE_FLAGS = \$(INCLUDES) -I./"
echo
printf "%b\n" "HEADERS =$HEADERS"
echo
......@@ -34,10 +40,10 @@ printf "%b\n" "SOURCES =$SOURCES"
echo
echo "OBJECTS = \$(SOURCES:.cpp=.o)"
echo
echo "LIB_NAME = libcppa.dylib"
echo "LIB_NAME = $LIB_NAME"
echo
echo "%.o : %.cpp \$(HEADERS)"
printf "%b\n" "\t\$(CXX) \$(CXXFLAGS) \$(INCLUDES) -fPIC -c \$< -o \$@"
printf "%b\n" "\t\$(CXX) \$(CXXFLAGS) \$(INCLUDE_FLAGS) -fPIC -c \$< -o \$@"
echo
echo "\$(LIB_NAME) : \$(OBJECTS) \$(HEADERS)"
printf "%b\n" "\t\$(CXX) \$(LIBS) -dynamiclib -o \$(LIB_NAME) \$(OBJECTS)"
......
include ../Makefile.rules
#CXX = /opt/local/bin/g++-mp-4.5
#CXX = /opt/local/bin/g++-mp-4.6
#CXXFLAGS = -std=c++0x -pedantic -Wall -Wextra -g -O0 -I/opt/local/include/
#CXXFLAGS = -std=c++0x -pedantic -Wall -Wextra -O2 -I/opt/local/include/
#LIBS = -L/opt/local/lib -lboost_thread-mt -L../ -lcppa
INCLUDES = -I./ -I../
INCLUDE_FLAGS = $(INCLUDES) -I../ ./
LIB_FLAGS = $(LIBS) -L../ -lcppa
EXECUTABLE = ../test
......@@ -28,11 +25,11 @@ SOURCES = hash_of.cpp \
OBJECTS = $(SOURCES:.cpp=.o)
%.o : %.cpp $(HEADERS) $(HEADERS)
$(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
%.o : %.cpp $(HEADERS)
$(CXX) $(CXXFLAGS) $(INCLUDE_FLAGS) -c $< -o $@
$(EXECUTABLE) : $(OBJECTS) $(HEADERS)
$(CXX) $(LIBS) -L../ -lcppa $(OBJECTS) -o $(EXECUTABLE)
$(CXX) $(LIB_FLAGS) $(OBJECTS) -o $(EXECUTABLE)
all : $(EXECUTABLE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment