jwboyer / rpms / abc

Forked from rpms/abc 3 years ago
Clone

Blame abc-sharedlib.patch

Jerry James 575c8c7
--- ./Makefile.orig	2014-12-01 12:00:00.000000000 -0700
Jerry James 575c8c7
+++ ./Makefile	2014-12-01 12:00:00.000000000 -0700
Jerry James 575c8c7
@@ -44,7 +44,7 @@ arch_flags : arch_flags.c
Jerry James 575c8c7
 ARCHFLAGS ?= $(shell $(CC) arch_flags.c -o arch_flags && ./arch_flags)
Jerry James 575c8c7
 OPTFLAGS  ?= -g -O #-DABC_NAMESPACE=xxx
Jerry James 575c8c7
 
Jerry James 575c8c7
-CFLAGS   += -Wall -Wno-unused-function -Wno-write-strings -Wno-sign-compare $(OPTFLAGS) $(ARCHFLAGS) -Isrc
Jerry James 575c8c7
+CFLAGS   += -Wno-unused-function $(OPTFLAGS) $(ARCHFLAGS) -Isrc
Jerry James 575c8c7
 
Jerry James 575c8c7
 # Set -Wno-unused-bug-set-variable for GCC 4.6.0 and greater only
Jerry James 575c8c7
 ifneq ($(or $(findstring gcc,$(CC)),$(findstring g++,$(CC))),)
Jerry James 575c8c7
@@ -143,6 +143,12 @@ $(PROG): $(OBJ)
Jerry James 575c8c7
 	@echo "$(MSG_PREFIX)\`\` Building binary:" $(notdir $@)
Jerry James 575c8c7
 	@$(LD) -o $@ $^ $(LIBS)
Jerry James 575c8c7
 
Jerry James 575c8c7
+lib$(PROG).so: $(OBJ)
Jerry James 575c8c7
+	@echo "$(MSG_PREFIX)\`\` Linking:" $(notdir $@)
Jerry James 575c8c7
+	$(LD) -shared -Wl,-h,lib$(PROG).so.0 -o lib$(PROG).so.0.0.0 $^ $(LIBS)
Jerry James 575c8c7
+	@ln -s lib$(PROG).so.0.0.0 lib$(PROG).so.0
Jerry James 575c8c7
+	@ln -s lib$(PROG).so.0 $@
Jerry James 575c8c7
+
Jerry James 575c8c7
 lib$(PROG).a: $(OBJ)
Jerry James 575c8c7
 	@echo "$(MSG_PREFIX)\`\` Linking:" $(notdir $@)
Jerry James 575c8c7
 	@ar rv $@ $?