diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-10-29 16:41:14 -0700 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-08-29 20:20:40 +0900 |
commit | 157d313994cd3316c4f84c6e9ac66255c8b544d8 (patch) | |
tree | 6015d90447901651b783d58aff5b6c1fbe8bcda8 | |
parent | 744638203a17189527439f0fc35953ac88664bde (diff) | |
download | libaio-157d313994cd3316c4f84c6e9ac66255c8b544d8.tar.gz libaio-157d313994cd3316c4f84c6e9ac66255c8b544d8.tar.bz2 libaio-157d313994cd3316c4f84c6e9ac66255c8b544d8.zip |
libdevdir
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | src/Makefile | 12 |
2 files changed, 15 insertions, 6 deletions
@@ -5,9 +5,11 @@ RELEASE=$(shell awk '/Release:/ { print $$2 }' $(SPECFILE)) CVSTAG = $(NAME)_$(subst .,-,$(VERSION))_$(subst .,-,$(RELEASE)) RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm") +DESTDIR= prefix=/usr includedir=$(prefix)/include libdir=$(prefix)/lib +libdevdir=$(prefix)/lib default: all @@ -15,7 +17,12 @@ all: @$(MAKE) -C src install: - @$(MAKE) -C src install prefix=$(prefix) includedir=$(includedir) libdir=$(libdir) + @$(MAKE) -C src install \ + DESTDIR=$(DESTDIR) \ + prefix=$(prefix) \ + includedir=$(includedir) \ + libdir=$(libdir) \ + libdevdir=$(libdevdir) check: @$(MAKE) -C harness check diff --git a/src/Makefile b/src/Makefile index 6c7cac8..adf0ce9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,6 +1,8 @@ +DESTDIR= prefix=/usr includedir=$(prefix)/include libdir=$(prefix)/lib +libdevdir=$(prefix)/lib CFLAGS ?= -g -fomit-frame-pointer -O2 CFLAGS += -nostdlib -nostartfiles -Wall -I. -fPIC @@ -53,11 +55,11 @@ $(libname): $(libaio_sobjs) libaio.map $(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS) install: $(all_targets) - install -D -m 644 libaio.h $(includedir)/libaio.h - install -D -m 644 libaio.a $(libdir)/libaio.a - install -D -m 755 $(libname) $(libdir)/$(libname) - ln -sf $(libname) $(libdir)/$(soname) - ln -sf $(libname) $(libdir)/libaio.so + install -D -m 644 libaio.h $(DESTDIR)$(includedir)/libaio.h + install -D -m 644 libaio.a $(DESTDIR)$(libdevdir)/libaio.a + install -D -m 755 $(libname) $(DESTDIR)$(libdir)/$(libname) + ln -sf $(libdir)/$(libname) $(DESTDIR)$(libdir)/$(soname) + ln -sf $(libdir)/$(libname) $(DESTDIR)$(libdevdir)/libaio.so $(libaio_objs): libaio.h |