Simple install target
This commit is contained in:
parent
4898a1e494
commit
5aa09e2db8
1 changed files with 16 additions and 0 deletions
16
Makefile
16
Makefile
|
@ -1,4 +1,6 @@
|
|||
CFLAGS = -g -O3 -ansi -pedantic -Wall -Wextra -Wno-unused-parameter -Isrc
|
||||
PREFIX ?= /usr/local
|
||||
DESTDIR ?= /
|
||||
|
||||
ifneq ($(OS),Windows_NT)
|
||||
CFLAGS += -fPIC
|
||||
|
@ -59,6 +61,20 @@ clean:
|
|||
$(RM) libhoedown.so libhoedown.so.1 libhoedown.a
|
||||
$(RM) hoedown smartypants hoedown.exe smartypants.exe
|
||||
|
||||
# Installing
|
||||
|
||||
install:
|
||||
install -m755 -d $(DESTDIR)$(PREFIX)/lib
|
||||
install -m755 -d $(DESTDIR)$(PREFIX)/bin
|
||||
install -m755 -d $(DESTDIR)$(PREFIX)/include
|
||||
|
||||
install -m644 libhoedown.* $(DESTDIR)$(PREFIX)/lib
|
||||
install -m755 hoedown $(DESTDIR)$(PREFIX)/bin
|
||||
install -m755 smartypants $(DESTDIR)$(PREFIX)/bin
|
||||
|
||||
install -m755 -d $(DESTDIR)$(PREFIX)/include/hoedown
|
||||
install -m644 src/*.h $(DESTDIR)$(PREFIX)/include/hoedown
|
||||
|
||||
# Generic object compilations
|
||||
|
||||
%.o: %.c
|
||||
|
|
Loading…
Reference in a new issue