jwboyer / rpms / abc

Forked from rpms/abc 3 years ago
Clone
Blob Blame History Raw
--- Makefile.orig	2018-07-05 14:10:12.171993636 -0600
+++ Makefile	2018-07-05 14:13:34.091565427 -0600
@@ -54,7 +54,7 @@ ARCHFLAGS := $(ARCHFLAGS)
 
 OPTFLAGS  ?= -g -O
 
-CFLAGS    += -Wall -Wno-unused-function -Wno-write-strings -Wno-sign-compare $(ARCHFLAGS)
+CFLAGS    += -Wno-unused-function $(OPTFLAGS) $(ARCHFLAGS) -Isrc
 ifneq ($(findstring arm,$(shell uname -m)),)
 	CFLAGS += -DABC_MEMALIGN=4
 endif
@@ -222,7 +222,9 @@ lib$(PROG).a: $(LIBOBJ)
 
 lib$(PROG).so: $(LIBOBJ)
 	@echo "$(MSG_PREFIX)\`\` Linking:" $(notdir $@)
-	$(VERBOSE)$(CXX) -shared -o $@ $^ $(LIBS)
+	$(VERBOSE)$(CXX) -shared -Wl,-h,lib$(PROG).so.0 -o lib$(PROG).so.0.0.0 $^ $(LIBS)
+	$(VERBOSE)ln -s lib$(PROG).so.0.0.0 lib$(PROG).so.0
+	$(VERBOSE)ln -s lib$(PROG).so.0 $@
 
 docs:
 	@echo "$(MSG_PREFIX)\`\` Building documentation." $(notdir $@)