From 4feb7ce3286831fbb32728fbe6354ec4e8c858cb Mon Sep 17 00:00:00 2001 From: cdkerse Date: Tue, 11 Jun 2013 16:26:12 -0600 Subject: [PATCH] Added install target to makefile. --- src/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 9f27bd05..dd57e573 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,13 +1,14 @@ ################################################################################ # HARPtools by Chad D. Kersey, Summer 2011 # ################################################################################ -CXXFLAGS ?= -O3 # -g -DUSE_DEBUG=3 -fPIC +CXXFLAGS ?= -fPIC -O3 # -g -DUSE_DEBUG=3 LDLIBS ?= -lharplib -pthread LDFLAGS ?= -L. +PREFIX ?= /usr/local LIB_OBJS=args.o obj.o mem.o core.o instruction.o enc.o util.o lex.yy.o -all: harptool # libharplib.so libharplib.a libqsim-harp.so +all: harptool libharplib.so libharplib.a libqsim-harp.so # Use -static so we don't have to install the library in order to just run # Harptool. @@ -48,5 +49,10 @@ libqsim-harp.so: args.cpp enc.cpp instruction.cpp obj.cpp util.cpp mem.cpp \ lex.yy.cc: scanner.lex flex scanner.lex +install: + cp libharplib.so $(PREFIX)/lib + cp harptool $(PREFIX)/bin + cp -r include $(PREFIX)/include/harp + clean: rm -f *~ \#* *.o *.a *.so include/*~ include/\#* harptool