mirror of
https://github.com/plasma-umass/coz.git
synced 2024-09-11 04:55:25 +03:00
Implement 'make install DESTDIR=target'.
This commit is contained in:
parent
ac9f6c7420
commit
781409b49e
4
Makefile
4
Makefile
@ -2,3 +2,7 @@ ROOT := .
|
||||
DIRS := libcoz benchmarks
|
||||
|
||||
include $(ROOT)/common.mk
|
||||
|
||||
install::
|
||||
$(INSTALL) -D coz $(DESTDIR)$(bindir)/coz
|
||||
$(INSTALL) -D include/coz.h $(DESTDIR)$(incdir)/coz.h
|
||||
|
10
common.mk
10
common.mk
@ -1,3 +1,11 @@
|
||||
DESTDIR =
|
||||
prefix = /usr
|
||||
bindir = $(prefix)/bin
|
||||
pkglibdir = $(prefix)/lib/coz-profiler
|
||||
incdir = $(prefix)/include
|
||||
|
||||
INSTALL = install
|
||||
|
||||
# Build with clang
|
||||
CC := clang
|
||||
CXX := clang++
|
||||
@ -19,7 +27,7 @@ SRCS ?= $(wildcard *.cpp) $(wildcard *.c)
|
||||
OBJS ?= $(addprefix obj/,$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$(SRCS))))
|
||||
|
||||
# Targets to build recirsively into $(DIRS)
|
||||
RECURSIVE_TARGETS ?= all clean bench test
|
||||
RECURSIVE_TARGETS ?= all clean bench test install
|
||||
|
||||
# Build in parallel
|
||||
MAKEFLAGS := -j
|
||||
|
@ -6,3 +6,6 @@ CXXFLAGS := --std=c++11 -g -O2 -fPIC -I$(ROOT)/include
|
||||
PREREQS := $(ROOT)/deps/ccutil $(ROOT)/deps/libelfin
|
||||
|
||||
include $(ROOT)/common.mk
|
||||
|
||||
install::
|
||||
$(INSTALL) -D $(ROOT)/libcoz/libcoz.so $(DESTDIR)$(pkglibdir)/libcoz.so
|
||||
|
Loading…
Reference in New Issue
Block a user