diff --git a/Makefile b/Makefile index a8dedc2..74ebdbf 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ ifeq ($(ARCH),$(filter $(ARCH),i386 i686)) override ARCH = x86 endif +LIBDIR := /lib CFLAGS = -ggdb3 -O2 -Wall -Iarch/${ARCH} -Iarch/common LIBUCONTEXT_C_SRC = $(wildcard arch/${ARCH}/*.c) @@ -13,8 +14,8 @@ LIBUCONTEXT_SOVERSION = 0 LIBUCONTEXT_NAME = libucontext.so LIBUCONTEXT_STATIC_NAME = libucontext.a LIBUCONTEXT_SONAME = libucontext.so.${LIBUCONTEXT_SOVERSION} -LIBUCONTEXT_PATH = /lib/${LIBUCONTEXT_SONAME} -LIBUCONTEXT_STATIC_PATH = /lib/${LIBUCONTEXT_STATIC_NAME} +LIBUCONTEXT_PATH = ${LIBDIR}/${LIBUCONTEXT_SONAME} +LIBUCONTEXT_STATIC_PATH = ${LIBDIR}/${LIBUCONTEXT_STATIC_NAME} all: ${LIBUCONTEXT_SONAME} ${LIBUCONTEXT_STATIC_NAME} @@ -39,9 +40,9 @@ clean: ${LIBUCONTEXT_OBJ} test_libucontext install: all - install -D -m755 ${LIBUCONTEXT_NAME} ${DESTDIR}/${LIBUCONTEXT_PATH} - install -D -m664 ${LIBUCONTEXT_STATIC_NAME} ${DESTDIR}/${LIBUCONTEXT_STATIC_PATH} - ln -sf ${LIBUCONTEXT_SONAME} ${DESTDIR}/lib/${LIBUCONTEXT_NAME} + install -D -m755 ${LIBUCONTEXT_NAME} ${DESTDIR}${LIBUCONTEXT_PATH} + install -D -m664 ${LIBUCONTEXT_STATIC_NAME} ${DESTDIR}${LIBUCONTEXT_STATIC_PATH} + ln -sf ${LIBUCONTEXT_SONAME} ${DESTDIR}${LIBDIR}/${LIBUCONTEXT_NAME} check: test_libucontext ${LIBUCONTEXT_SONAME} env LD_LIBRARY_PATH=$(shell pwd) ./test_libucontext