summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2017-06-14 18:36:10 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2017-06-14 18:36:10 +0000
commit918682c02bce090b0a8bd224883b38783ff0f8b0 (patch)
tree93e583ba2779b191cf453f62e19d76175618c25d /Makefile
parentd059c61022230a89467e3aaf6475a53d5f2bbdf5 (diff)
downloadgcompat-918682c02bce090b0a8bd224883b38783ff0f8b0.tar.gz
gcompat-918682c02bce090b0a8bd224883b38783ff0f8b0.tar.bz2
gcompat-918682c02bce090b0a8bd224883b38783ff0f8b0.tar.xz
gcompat-918682c02bce090b0a8bd224883b38783ff0f8b0.zip
build system: add install target, fix loader build rules
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files 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}