From 918682c02bce090b0a8bd224883b38783ff0f8b0 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Wed, 14 Jun 2017 18:36:10 +0000 Subject: build system: add install target, fix loader build rules --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5574d68..b6e497a 100644 --- a/Makefile +++ b/Makefile @@ -28,11 +28,15 @@ all: ${LIBGCOMPAT_NAME} ${LOADER_NAME} ${LIBGCOMPAT_NAME}: ${LIBGCOMPAT_OBJ} gcc -o ${LIBGCOMPAT_NAME} -Wl,-soname,${LIBGCOMPAT_NAME} -shared ${LIBGCOMPAT_OBJ} -${LIBGCOMPAT_NAME}: ${LIBGCOMPAT_OBJ} - gcc -o ${LIBGCOMPAT_NAME} -Wl,-soname,${LIBGCOMPAT_NAME} -shared ${LIBGCOMPAT_OBJ} +${LOADER_NAME}: ${LOADER_OBJ} + gcc -o ${LOADER_NAME} -fPIE -static ${LOADER_OBJ} .c.o: gcc -fPIC -DPIC -DLINKER=\"${LINKER_PATH}\" -DLIBGCOMPAT=\"${LIBGCOMPAT_PATH}\" ${CFLAGS} ${CPPFLAGS} -c -o $@ $< clean: rm -f libgcompat/*.o loader/*.o ${LIBGCOMPAT_NAME} ${LOADER_NAME} + +install: all + install -D -m755 ${LIBGCOMPAT_NAME} ${DESTDIR}/${LIBGCOMPAT_PATH} + install -D -m755 ${LOADER_NAME} ${DESTDIR}/${LOADER_PATH} -- cgit v1.2.3-70-g09d2