blob: b5989e582786467f45bf070a319ebd7ac3008f49 [file] [log] [blame]
--- libsrcs/angelscript/angelSVN/sdk/angelscript/projects/gnuc/makefile
+++ libsrcs/angelscript/angelSVN/sdk/angelscript/projects/gnuc/makefile
@@ -12,7 +12,9 @@
INCDIR = ../../include
OBJDIR = obj
-CXX = gcc
+CXX ?= g++
+# FIXME: https://bugs.gentoo.org/show_bug.cgi?id=285448
+#CXXFLAGS += -Wall -fPIC -fno-strict-aliasing
CXXFLAGS = -g -Wall -fPIC
DELETER = rm -f
COPIER = cp
@@ -59,8 +61,8 @@
all: $(BIN)
$(BIN): $(OBJ)
- ar r $(BIN) $(OBJ)
- ranlib $(BIN)
+ $(AR) r $(BIN) $(OBJ)
+ $(RANLIB) $(BIN)
@echo -------------------------------------------------------------------
@echo Done. As root, type 'make install' to install the library.
--- source/Makefile
+++ source/Makefile
@@ -52,7 +52,7 @@
#LD=gcc
else
CC?=gcc
-LD=gcc
+LD=$(CC)
# this nice line comes from the linux kernel makefile
BASE_ARCH:=$(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc/ -e s/sparc64/sparc/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/alpha/axp/)
@@ -134,9 +134,9 @@
LOCALBASE?=/usr/local
X11BASE?=/usr/X11R6
-CFLAGS_COMMON=$(CFLAGS) -pipe -I. -I$(LOCALBASE)/include -I$(X11BASE)/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Wall
-CFLAGS_RELEASE=-O2 -fno-strict-aliasing -ffast-math -funroll-loops -DNDEBUG
-CFLAGS_DEBUG=-O0 -ggdb -D_DEBUG
+CFLAGS_COMMON=$(CFLAGS) -I. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Wall -fno-strict-aliasing
+CFLAGS_RELEASE=-DNDEBUG
+CFLAGS_DEBUG=-D_DEBUG
ifeq ($(DEBUG_BUILD),YES)
CFLAGS_COMMON+=$(CFLAGS_DEBUG)
else
@@ -152,7 +152,7 @@
ifeq ($(OS),FreeBSD)
LDFLAGS_COMMON=-L/usr/local/lib -lm -pthread
else
-LDFLAGS_COMMON=-L/usr/local/lib -ldl -lm -Wl -O1 --as-needed
+LDFLAGS_COMMON=$(LDFLAGS) -ldl -lm
endif
ifeq ($(ARCH),x86_64)
@@ -168,7 +168,7 @@
# openal
ifeq ($(BUILD_SND_OPENAL),YES)
-OPENAL_CONFIG?=openal-config
+OPENAL_CONFIG?=pkg-config openal
CFLAGS_OPENAL=$(shell $(OPENAL_CONFIG) --cflags)
LDFLAGS_OPENAL=-lvorbisfile
@@ -400,16 +400,16 @@
all: client openal qf ded cgame game ui irc angelwrap tv_server
-client: $(BUILDDIRS) message-client compile-client link-client start-script-client
+client: $(BUILDDIRS) message-client compile-client link-client
openal: $(BUILDDIRS) message-openal compile-openal link-openal
qf: $(BUILDDIRS) message-qf compile-qf link-qf
-ded: $(BUILDDIRS) message-ded compile-ded link-ded start-script-ded
+ded: $(BUILDDIRS) message-ded compile-ded link-ded
cgame: $(BUILDDIRS) message-cgame compile-cgame link-cgame
game: $(BUILDDIRS) message-game compile-game link-game
ui: $(BUILDDIRS) message-ui compile-ui link-ui
irc: $(BUILDDIRS) message-irc compile-irc link-irc
angelwrap: $(BUILDDIRS) message-angelwrap compile-angelwrap link-angelwrap
-tv_server: $(BUILDDIRS) message-tv_server compile-tv_server link-tv_server start-script-tv_server
+tv_server: $(BUILDDIRS) message-tv_server compile-tv_server link-tv_server
clean: clean-msg clean-depend clean-client clean-openal clean-qf clean-ded clean-cgame clean-game clean-ui clean-irc clean-angelwrap clean-tv_server