From 1caae0e4cdbd2a073ff450cfc46165f53c75c77c Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Thu, 9 Apr 2015 17:12:46 +1000 Subject: [PATCH] * update makefile / add 'install' target --- src/Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 1062864..86df4be 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,7 +1,8 @@ CFLAGS=-Wall -Wextra -O2 -g -std=c99 -pedantic -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security CPPFLAGS=-D_FORTIFY_SOURCE=2 -SONAME=libimgdup.so.2 +SONAME=libimgdup.so.3 LDFLAGS=-Wl,-soname,$(SONAME) -fPIC +PREFIX ?= /usr/local all: libs utils @@ -30,7 +31,14 @@ utils: imdb-query imdb-query-st imdb-write imdb-1to2 GMFLAGS=$(shell GraphicsMagickWand-config --cppflags --ldflags --libs) imdb-write: imdb-write.c sample.c bitmap.c database.c - gcc $(CFLAGS) $(CPPFLAGS) $(GMFLAGS) -o $@ $^ + gcc $(CFLAGS) $(CPPFLAGS) $(GMFLAGS) -limgdup -o $@ $^ + +install: libimgdup.so utils + install -m755 -s -o root imdb-query $(PREFIX)/bin + install -m755 -s -o root imdb-write $(PREFIX)/bin + install -m755 -s -o root imdb-1to2 $(PREFIX)/bin + install -m644 -s -o root $(SONAME) $(PREFIX)/lib + install -m644 -s -o root libimgdup.so $(PREFIX)/lib clean: rm -f *.o