mirror of
https://git.planet-casio.com/Lephenixnoir/libprof.git
synced 2024-12-28 04:23:41 +01:00
add support for DESTDIR for packaging
This commit is contained in:
parent
ef49aa8da4
commit
f79e6d2cc6
1 changed files with 4 additions and 4 deletions
8
Makefile
8
Makefile
|
@ -7,10 +7,10 @@ target ?= sh-elf
|
||||||
lib := libprof.a
|
lib := libprof.a
|
||||||
header := libprof.h
|
header := libprof.h
|
||||||
|
|
||||||
prefix := $(shell $(target)-gcc -print-search-dirs | grep install \
|
PREFIX ?= $(shell $(target)-gcc -print-search-dirs | grep install \
|
||||||
| sed 's/install: //')
|
| sed 's/install: //')
|
||||||
|
|
||||||
ifeq "$(prefix)" ""
|
ifeq "$(PREFIX)" ""
|
||||||
$(error "Cannot determine compiler install path")
|
$(error "Cannot determine compiler install path")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -42,5 +42,5 @@ distclean: clean
|
||||||
# Install
|
# Install
|
||||||
|
|
||||||
install:
|
install:
|
||||||
cp $(lib) $(prefix)
|
cp $(lib) $(DESTDIR)$(PREFIX)
|
||||||
cp $(header) $(prefix)/include
|
cp $(header) $(DESTDIR)$(PREFIX)/include
|
||||||
|
|
Loading…
Reference in a new issue