summaryrefslogtreecommitdiff
blob: 608303c66ed69d7a48099be93b35e6d5f740c907 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
--- Makefile.orig	2013-02-23 17:24:43.000000000 +0200
+++ Makefile	2017-10-16 01:50:02.531404913 +0300
@@ -14,8 +14,10 @@
 
 CFLAGS = -Wall -O3 -fPIC -fomit-frame-pointer -I vm -D_GNU_SOURCE -I libs/common
 EXTFLAGS = -pthread
-MAKESO = $(CC) -shared -Wl,-Bsymbolic
-LIBNEKO_NAME = libneko.so
+MAJOR = libneko.so
+MINOR = 2.0.0
+MAKESO = $(CC) -shared -Wl,-soname,${MAJOR}
+LIBNEKO_NAME = ${MAJOR}.${MINOR}
 LIBNEKO_LIBS = -ldl -lgc -lm
 NEKOVM_FLAGS = -Lbin -lneko
 STD_NDLL_FLAGS = ${NEKOVM_FLAGS} -lrt
@@ -70,6 +72,7 @@
 	-mkdir bin 2>/dev/null
 
 libneko: bin/${LIBNEKO_NAME}
+	ln -s ${LIBNEKO_NAME} bin/${MAJOR}
 
 libs:
 	(cd src; ${NEKO_EXEC} nekoc tools/install.neko)
@@ -108,6 +111,7 @@
 
 clean:
 	rm -rf bin/${LIBNEKO_NAME} ${LIBNEKO_OBJECTS} ${VM_OBJECTS}
+	rm -rf bin/libneko.so*
 	rm -rf bin/neko bin/nekoc bin/nekoml bin/nekotools
 	rm -rf bin/std bin/*.ndll bin/*.n libs/*/*.o
 	rm -rf src/*.n src/neko/*.n src/nekoml/*.n src/tools/*.n
@@ -115,6 +119,8 @@
 
 install:
 	cp bin/${LIBNEKO_NAME} ${INSTALL_PREFIX}/lib
+#	ln -s ${INSTALL_PREFIX}/lib/${LIBNEKO_NAME} ${INSTALL_PREFIX}/lib/${MAJOR}
+	ln -s ${LIBNEKO_NAME} ${INSTALL_PREFIX}/lib/${MAJOR}
 	cp bin/neko bin/nekoc bin/nekotools bin/nekoml bin/nekoml.std ${INSTALL_PREFIX}/bin
 	-mkdir ${INSTALL_PREFIX}/lib/neko
 	cp bin/*.ndll ${INSTALL_PREFIX}/lib/neko