From bef56380e2a8aa3cd910dc75d755d5d4f6f60271 Mon Sep 17 00:00:00 2001 From: epochqwert Date: Tue, 12 Mar 2019 17:30:12 +0000 Subject: fixed Makefile to use install instead of cp, to use ld instead of assuming, and optional PREFIX override. --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 02f62b5..8f702b6 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ -CFLAGS=-fpic -shared -pedantic -Wall -ggdb +CFLAGS=-fpic -shared -pedantic -Wall -g3 TARGET=libirc.so -PREFIX=/usr/local +PREFIX:=/usr/local all: libirc.so @@ -12,5 +12,7 @@ clean: rm *.o install: all - cp $(TARGET) $(PREFIX)/lib/$(TARGET) - cp irc.h $(PREFIX)/include/irc.h + mkdir -p $(PREFIX)/lib + mkdir -p $(PREFIX)/include + install $(TARGET) $(PREFIX)/lib/$(TARGET) + install irc.h $(PREFIX)/include/irc.h -- cgit v1.2.3