summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
1 files changed, 1 insertions, 31 deletions
diff --git a/Makefile b/Makefile
index b4282cf..9253ccc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,4 @@
-ifeq ($(SYSTEM),)
- SYSTEM = $(shell uname | cut -f 1 -d_)
-endif
-
-TRUESYSTEM = $(shell uname)
-MACHINE = $(shell uname -m)
-DISTRIB = $(shell cat /etc/issue | cut -f 1 -d\ | head -1)
-
-CC = gcc
-CXX = g++
-LD = g++
-AS = gcc -c
-AR = ar rcs
-
-BINEXT = bin
-
-CPPFLAGS += -fno-strict-aliasing
+include Balau/common.mk
ifeq ($(DEBUG),)
CPPFLAGS += -g -O3 -DNDEBUG
@@ -28,32 +12,18 @@ INCLUDES = includes Balau/includes Balau/libcoro Balau/libeio Balau/libev Balau/
LIBS = z readline
ifeq ($(SYSTEM),Darwin)
- CC = clang
- CXX = clang++
- CPPFLAGS += -fPIC
- LDFLAGS += -fPIC
LIBS += pthread iconv
CONFIG_H = Balau/darwin-config.h
- ARCH_FLAGS = -arch i386
- LD = clang++ -arch i386
- STRIP = strip -x
endif
ifeq ($(SYSTEM),Linux)
- CPPFLAGS += -fPIC
- LDFLAGS += -fPIC -rdynamic
LIBS += pthread dl
CONFIG_H = Balau/linux-config.h
- ARCH_FLAGS = -march=i686 -m32
- ASFLAGS = -march=i686 --32
- STRIP = strip --strip-unneeded
endif
CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) -fexceptions -imacros $(CONFIG_H)
CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
-CXXFLAGS += -Wno-deprecated -std=gnu++0x
-
LDFLAGS += $(ARCH_FLAGS)
LDLIBS = $(addprefix -l, $(LIBS))