From 8a77ab6e1ffb42c677fc303f42de637f72bbbde8 Mon Sep 17 00:00:00 2001 From: Echelon9 Date: Fri, 30 Oct 2015 01:32:49 +1100 Subject: [PATCH] Fixup GNU Makefile for building intermediate tools --- .gitignore | 3 +++ build/gnu/Makefile | 16 +++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 2f5718f..9a6aa33 100644 --- a/.gitignore +++ b/.gitignore @@ -48,6 +48,9 @@ build/win32/[Rr]elease*/ Build/win32/ipch/ Ankh.NoLoad +#GCC +build/gnu/cxbe + #MonoDevelop *.pidb *.userprefs diff --git a/build/gnu/Makefile b/build/gnu/Makefile index 497e8dc..84163fe 100644 --- a/build/gnu/Makefile +++ b/build/gnu/Makefile @@ -33,11 +33,9 @@ # ****************************************************************** # * File Authors: Aaron Robinson, Edgar Hucek # ****************************************************************** -CC = g++ -CFLAGS = -g -O2 -I../../src -I../../src/Common/Linux -I../..src/Linux -OBJCOPY = objcopy -GCC295 = cpp0-2.95 -#LDFLAGS = -s -S -T ldscript.ld +CC ?= gcc +CXX ?= g++ +CFLAGS = -g -O2 -Wall -I../../src -I../../src/Common/Linux -I../..src/Linux OBJECTS = ../../src/Common/Error.o \ ../../src/Common/Exe.o \ @@ -51,16 +49,16 @@ RESOURCES = all : cxbe clean : - rm -rf *.o *~ core *.core ${OBJECTS} ${RESOURCES} - rm -rf *.o *~ core *.core ${OBJECTS} ${RESOURCES} ../../bin/cxbe ../../bin/cxbe.exe + ${RM} *.o *~ core *.core ${OBJECTS} ${RESOURCES} + ${RM} *.o *~ core *.core ${OBJECTS} ${RESOURCES} cxbe cxbe : ${OBJECTS} ${RESOURCES} - ${CC} -o ../../bin/$@ ${OBJECTS} ${RESOURCES} ${LDFLAGS-XBE} + ${CXX} ${OBJECTS} ${RESOURCES} -o $@ ### rules: %.o : %.cpp - ${CC} ${CFLAGS} -o $@ -c $< + ${CXX} ${CFLAGS} -o $@ -c $< %.o : %.c ${CC} ${CFLAGS} -o $@ -c $<