freebsd-ports/graphics/yukon/files/patch-Makefile

53 lines
1.8 KiB
Text

Index: Makefile
===================================================================
--- Makefile (revision 158)
+++ Makefile (working copy)
@@ -1,15 +1,14 @@
DESTDIR =
-PREFIX = /usr/local
LIBDIR = lib
CC = gcc
-CFLAGS = -Iinclude -Wall -std=c99 -O3
+CFLAGS = -I${PWD}/include -Wall -std=c99 -O3 -I$(LOCALBASE)/include -L$(LOCALBASE)/lib
OBJS = src/core/conf.o src/core/glue.o src/core/log.o
LIBS = libX11.so libGL.so
--include config.make
+###-include config.make
.PHONY: all clean install
all: $(LIBS) yukon-core-lib sysconf
@@ -23,20 +22,25 @@
rm -f $@.native
yukon-core-lib: $(OBJS)
- $(CC) -shared -o $@ $(OBJS) -lseom
+ $(CC) -shared -o $@ $(OBJS) -lseom -L${LOCALBASE}/lib
sysconf:
echo 'LDPATH="$(PREFIX)/$(LIBDIR)/yukon"' > $@
-soname = `objdump -x /usr/$(LIBDIR)/$(1) | grep SONAME | awk '{ print $$2 }'`
+soname = `objdump -x $(PREFIX)/$(LIBDIR)/$(1) | grep SONAME | awk '{ print $$2 }'`
install: $(LIBS) yukon-core-lib
install -m 755 -d $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/$(LIBDIR)/yukon
install -m 755 src/scripts/yukon $(DESTDIR)$(PREFIX)/bin
install -m 755 yukon-core-lib $(DESTDIR)$(PREFIX)/$(LIBDIR)/yukon
+ ln -sf $(LOCALBASE)/lib/libX11.so.$(LIBX11_MAJOR) \
+ $(PREFIX)/$(LIBDIR)/yukon/libX11.so.native
+ ln -sf $(LOCALBASE)/lib/libGL.so.$(LIBGL_MAJOR) \
+ $(PREFIX)/$(LIBDIR)/yukon/libGL.so.native
+ install -m 755 libX11.so \
+ $(PREFIX)/$(LIBDIR)/yukon/libX11.so.$(LIBX11_MAJOR)
+ install -m 755 libGL.so \
+ $(PREFIX)/$(LIBDIR)/yukon/libGL.so.$(LIBGL_MAJOR)
- $(foreach lib,$(LIBS),ln -sf /usr/$(LIBDIR)/$(lib) $(DESTDIR)$(PREFIX)/$(LIBDIR)/yukon/$(lib).native;)
- $(foreach lib,$(LIBS),install -m 755 $(lib) $(DESTDIR)$(PREFIX)/$(LIBDIR)/yukon/$(call soname,$(lib));)
-
clean:
rm -f $(OBJS) $(LIBS) yukon-core-lib sysconf