termux-packages/root-packages/libx86emu/Makefile.patch

43 lines
1.3 KiB
Diff
Raw Normal View History

2019-06-25 21:32:13 +02:00
diff -uNr libx86emu-2.3/Makefile libx86emu-2.3.mod/Makefile
--- libx86emu-2.3/Makefile 2019-04-24 09:37:42.000000000 +0300
+++ libx86emu-2.3.mod/Makefile 2019-06-25 21:28:20.156286593 +0300
@@ -11,17 +11,17 @@
MAJOR_VERSION := $(shell $(GIT2LOG) --version VERSION ; cut -d . -f 1 VERSION)
-CC = gcc
-CFLAGS = -g -O2 -fPIC -fvisibility=hidden -fomit-frame-pointer -Wall
+CC ?= gcc
+CFLAGS += -g -O2 -fPIC -fvisibility=hidden -fomit-frame-pointer -Wall $(CPPFLAGS)
-LIBDIR = /usr/lib$(shell ldd /bin/sh | grep -q /lib64/ && echo 64)
+LIBDIR = @TERMUX_PREFIX@/lib
LIBX86 = libx86emu
CFILES = $(wildcard *.c)
OBJS = $(CFILES:.c=.o)
-LIB_NAME = $(LIBX86).so.$(VERSION)
-LIB_SONAME = $(LIBX86).so.$(MAJOR_VERSION)
+LIB_NAME = $(LIBX86).so
+LIB_SONAME = $(LIBX86).so
.PHONY: all shared install test demo clean
@@ -37,14 +37,10 @@
install: shared
install -D $(LIB_NAME) $(DESTDIR)$(LIBDIR)/$(LIB_NAME)
- ln -snf $(LIB_NAME) $(DESTDIR)$(LIBDIR)/$(LIB_SONAME)
- ln -snf $(LIB_SONAME) $(DESTDIR)$(LIBDIR)/$(LIBX86).so
- install -m 644 -D include/x86emu.h $(DESTDIR)/usr/include/x86emu.h
+ install -m 644 -D include/x86emu.h $(DESTDIR)/@TERMUX_PREFIX@/include/x86emu.h
$(LIB_NAME): .depend $(OBJS)
$(CC) -shared -Wl,-soname,$(LIB_SONAME) $(OBJS) -o $(LIB_NAME)
- @ln -snf $(LIB_NAME) $(LIB_SONAME)
- @ln -snf $(LIB_SONAME) $(LIBX86).so
test:
make -C test