1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-18 03:46:03 +00:00
freebsd-ports/emulators/mupen64-tr64/files/patch-Makefile
Jose Alonso Cardenas Marquez 7154339408 - Add USE_DOS2UNIX
- Fix build with GCC4.x
- Clean up patch files

Approved by:	portmgr (pav)
2007-11-10 18:49:12 +00:00

40 lines
1.4 KiB
Plaintext

--- Makefile 2005-08-26 14:11:28.000000000 -0500
+++ Makefile 2007-10-09 01:55:17.000000000 -0500
@@ -1,26 +1,26 @@
ifneq ("$(shell grep GTK2 config.h)","\#define GTK2_SUPPORT 1")
-GTK_FLAGS = `gtk-config --cflags`
-GTK_LIBS = `gtk-config --libs`
+GTK_FLAGS = `${GTK_CONFIG} --cflags`
+GTK_LIBS = `${GTK_CONFIG} --libs`
else
GTK_FLAGS = `pkg-config gtk+-2.0 --cflags` -D_GTK2
GTK_LIBS = `pkg-config gtk+-2.0 --libs`
endif
-CC = gcc
-CFLAGS = -DUSE_GTK `sdl-config --cflags` $(GTK_FLAGS) -O3 -mcpu=athlon -ffast-math -funroll-loops -fomit-frame-pointer
-LD = gcc
-LDFLAGS = -lGL -lGLU -L/usr/X11R6/lib `sdl-config --libs`
+CC ?= gcc
+CFLAGS += -DUSE_GTK `${SDL_CONFIG} --cflags` $(GTK_FLAGS) -ffast-math -funroll-loops -fomit-frame-pointer
+LD = ${CXX}
+LDFLAGS = -lGL -lGLU -L${LOCALBAASE}/lib `${SDL_CONFIG} --libs`
OBJECTS = 3dmath.o autodet.o combine1.o debug.o display.o driver.o lighting.o rdp.o rdp_gl.o render.o sdlgl.o texture.o
-all: tr64gl.so instruction
+all: plugins/tr64gl.so instruction
-tr64gl.so: $(OBJECTS)
+plugins/tr64gl.so: $(OBJECTS)
+ mkdir -p plugins
$(LD) -shared -Wl,-Bsymbolic $(GTK_LIBS) $(LDFLAGS) -o $@ $(OBJECTS)
- strip --strip-all $@
instruction:
- $(warning please copy tr64gl.so in plugins/ folder of the emulator)
+ $(warning please copy plugins/tr64gl.so in plugins/ folder of the emulator)
.o: .c
$(CC) $(CFLAGS) -o $@ $<