LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File libs3-Makefile.diff of Package libs3 (Project home:garloff:OTC:curl)

Index: libs3-master/GNUmakefile
===================================================================
--- libs3-master.orig/GNUmakefile
+++ libs3-master/GNUmakefile
@@ -115,11 +115,11 @@ endif
 # compiler.
 
 ifndef CFLAGS
     ifdef DEBUG
-        CFLAGS := -g
+        CFLAGS := $(RPM_OPT_FLAGS) -g
     else
-        CFLAGS := -O3
+        CFLAGS := $(RPM_OPT_FLAGS) 
     endif
 endif
 
 CFLAGS += -Wall -Werror -Wshadow -Wextra -Iinc \
@@ -132,8 +132,9 @@ CFLAGS += -Wall -Werror -Wshadow -Wextra
           -D_POSIX_C_SOURCE=200112L
 
 LDFLAGS = $(CURL_LIBS) $(LIBXML2_LIBS) -lpthread
 
+LIB = lib
 
 # --------------------------------------------------------------------------
 # Default targets are everything
 
@@ -156,21 +157,21 @@ install: exported
 	$(QUIET_ECHO) $(DESTDIR)/bin/s3: Installing executable
 	$(VERBOSE_SHOW) install -Dps -m u+rwx,go+rx $(BUILD)/bin/s3 \
                     $(DESTDIR)/bin/s3
 	$(QUIET_ECHO) \
-        $(DESTDIR)/lib/libs3.so.$(LIBS3_VER): Installing shared library
+        $(DESTDIR)/$(LIB)/libs3.so.$(LIBS3_VER): Installing shared library
 	$(VERBOSE_SHOW) install -Dps -m u+rw,go+r \
-               $(BUILD)/lib/libs3.so.$(LIBS3_VER_MAJOR) \
-               $(DESTDIR)/lib/libs3.so.$(LIBS3_VER)
+               $(BUILD)/$(LIB)/libs3.so.$(LIBS3_VER_MAJOR) \
+               $(DESTDIR)/$(LIB)/libs3.so.$(LIBS3_VER)
 	$(QUIET_ECHO) \
-        $(DESTDIR)/lib/libs3.so.$(LIBS3_VER_MAJOR): Linking shared library
+        $(DESTDIR)/$(LIB)/libs3.so.$(LIBS3_VER_MAJOR): Linking shared library
 	$(VERBOSE_SHOW) ln -sf libs3.so.$(LIBS3_VER) \
-               $(DESTDIR)/lib/libs3.so.$(LIBS3_VER_MAJOR)
-	$(QUIET_ECHO) $(DESTDIR)/lib/libs3.so: Linking shared library
-	$(VERBOSE_SHOW) ln -sf libs3.so.$(LIBS3_VER_MAJOR) $(DESTDIR)/lib/libs3.so
-	$(QUIET_ECHO) $(DESTDIR)/lib/libs3.a: Installing static library
-	$(VERBOSE_SHOW) install -Dp -m u+rw,go+r $(BUILD)/lib/libs3.a \
-                    $(DESTDIR)/lib/libs3.a
+               $(DESTDIR)/$(LIB)/libs3.so.$(LIBS3_VER_MAJOR)
+	$(QUIET_ECHO) $(DESTDIR)/$(LIB)/libs3.so: Linking shared library
+	$(VERBOSE_SHOW) ln -sf libs3.so.$(LIBS3_VER_MAJOR) $(DESTDIR)/$(LIB)/libs3.so
+	$(QUIET_ECHO) $(DESTDIR)/$(LIB)/libs3.a: Installing static library
+	$(VERBOSE_SHOW) install -Dp -m u+rw,go+r $(BUILD)/$(LIB)/libs3.a \
+                    $(DESTDIR)/$(LIB)/libs3.a
 	$(QUIET_ECHO) $(DESTDIR)/include/libs3.h: Installing header
 	$(VERBOSE_SHOW) install -Dp -m u+rw,go+r $(BUILD)/include/libs3.h \
                     $(DESTDIR)/include/libs3.h
 
@@ -183,12 +184,12 @@ uninstall:
 	$(QUIET_ECHO) Installed files: Uninstalling
 	$(VERBOSE_SHOW) \
 	    rm -f $(DESTDIR)/bin/s3 \
               $(DESTDIR)/include/libs3.h \
-              $(DESTDIR)/lib/libs3.a \
-              $(DESTDIR)/lib/libs3.so \
-              $(DESTDIR)/lib/libs3.so.$(LIBS3_VER_MAJOR) \
-              $(DESTDIR)/lib/libs3.so.$(LIBS3_VER)
+              $(DESTDIR)/$(LIB)/libs3.a \
+              $(DESTDIR)/$(LIB)/libs3.so \
+              $(DESTDIR)/$(LIB)/libs3.so.$(LIBS3_VER_MAJOR) \
+              $(DESTDIR)/$(LIB)/libs3.so.$(LIBS3_VER)
 
 
 # --------------------------------------------------------------------------
 # Compile target patterns
@@ -212,10 +213,10 @@ $(BUILD)/obj/%.do: src/%.c
 
 # --------------------------------------------------------------------------
 # libs3 library targets
 
-LIBS3_SHARED = $(BUILD)/lib/libs3.so.$(LIBS3_VER_MAJOR)
-LIBS3_STATIC = $(BUILD)/lib/libs3.a
+LIBS3_SHARED = $(BUILD)/$(LIB)/libs3.so.$(LIBS3_VER_MAJOR)
+LIBS3_STATIC = $(BUILD)/$(LIB)/libs3.a
 
 .PHONY: libs3
 libs3: $(LIBS3_SHARED) $(LIBS3_STATIC)