From 8860ba11e6cb76586a32cb80cb443837a78e3a38 Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Mon, 15 Jul 2013 15:43:22 -0700 Subject: Using Balau's common.mk file to clean up Makefile. --- Balau | 2 +- Makefile | 32 +------------------------------- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/Balau b/Balau index 79ed0f9..9dfd1d7 160000 --- a/Balau +++ b/Balau @@ -1 +1 @@ -Subproject commit 79ed0f94c0c682e2902d8787885a007189a010b2 +Subproject commit 9dfd1d7a95988e0682d772010c3e13c6170e7d26 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)) -- cgit v1.2.3