]> pilppa.com Git - uci.git/commitdiff
x86/x86_64 install fixes
authorMika Laitio <mika.laitio@nokia.com>
Tue, 15 Jan 2013 00:04:28 +0000 (02:04 +0200)
committerMika Laitio <mika.laitio@nokia.com>
Tue, 15 Jan 2013 00:04:28 +0000 (02:04 +0200)
Signed-off-by: Mika Laitio <mika.laitio@nokia.com>
Makefile
Makefile.inc
lib64uci.pc [new file with mode: 0644]

index f9fe9dd45cc1ae0a6b822e641534088ea168dbca..109e56114818e14149f2ff02ab851314233ddd12 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -81,7 +81,7 @@ install-dev: all
        $(MKDIR) -p $(DESTDIR)$(prefix)/$(LIBDIRNAME)/pkgconfig
        $(INSTALL) -m0644 libuci.a $(DESTDIR)$(prefix)/$(LIBDIRNAME)/
        $(INSTALL) -m0644 uci_config.h uci.h ucimap.h $(DESTDIR)$(prefix)/include/
-       $(INSTALL) -m0644 libuci.pc $(DESTDIR)$(prefix)/$(LIBDIRNAME)/pkgconfig
+       $(INSTALL) -m0644 $(LIBUCIPC) $(DESTDIR)$(prefix)/$(LIBDIRNAME)/pkgconfig/libuci.pc
 
 install-bin: all
        $(MKDIR) -p $(DESTDIR)$(prefix)/$(LIBDIRNAME)
index 2cfce43eba1a06a00930b9f6b85e5b48d36a1277..698caf2270cc9e15b9b4c32bcda1efcfc8100aca 100644 (file)
@@ -1,6 +1,13 @@
 prefix=/usr
 DESTDIR=
-LIBDIRNAME=lib
+UNAME_P := $(shell uname -p)
+ifeq ($(UNAME_P),x86_64)
+       LIBDIRNAME=lib64
+       LIBUCIPC=lib64uci.pc
+else
+       LIBDIRNAME=lib
+       LIBUCIPC=libuci.pc
+endif
 
 COPTS=-O2
 WOPTS=-pedantic -Werror -Wall
diff --git a/lib64uci.pc b/lib64uci.pc
new file mode 100644 (file)
index 0000000..19344d6
--- /dev/null
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${prefix}/lib64
+includedir=${prefix}/include
+
+Name: libuci
+Description: Unified Configuration Interface
+Version: 0.8
+Libs: -L${libdir} -luci 
+Cflags: -I${includedir}