make (un)install
This commit is contained in:
parent
b5ff71655d
commit
1e4a4e460d
14
Makefile
14
Makefile
|
@ -59,6 +59,20 @@ util.a: $(LIB)
|
||||||
@echo AR -r $@
|
@echo AR -r $@
|
||||||
@$(AR) -r -c $@ $(LIB)
|
@$(AR) -r -c $@ $(LIB)
|
||||||
|
|
||||||
|
install:
|
||||||
|
@echo installing executables to $(DESTDIR)$(PREFIX)/bin
|
||||||
|
@mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||||
|
@cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin
|
||||||
|
@cd $(DESTDIR)$(PREFIX)/bin && chmod 755 $(BIN)
|
||||||
|
@echo installing manual pages to $(DESTDIR)$(MANPREFIX)/man1
|
||||||
|
@mkdir -p $(DESTDIR)$(MANPREFIX)/man1
|
||||||
|
@cp -f $(MAN) $(DESTDIR)$(MANPREFIX)/man1
|
||||||
|
@cd $(DESTDIR)$(MANPREFIX)/man1 && chmod 644 $(MAN)
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
@cd $(DESTDIR)$(PREFIX)/bin && rm -f $(BIN)
|
||||||
|
@cd $(DESTDIR)$(MANPREFIX)/man1 && rm -f $(MAN)
|
||||||
|
|
||||||
dist: clean
|
dist: clean
|
||||||
@echo creating dist tarball
|
@echo creating dist tarball
|
||||||
@mkdir -p sbase-$(VERSION)
|
@mkdir -p sbase-$(VERSION)
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
# sbase version
|
# sbase version
|
||||||
VERSION = 0.0
|
VERSION = 0.0
|
||||||
|
|
||||||
|
# paths
|
||||||
|
PREFIX = /usr/local
|
||||||
|
MANPREFIX = ${PREFIX}/share/man
|
||||||
|
|
||||||
#CC = gcc
|
#CC = gcc
|
||||||
CC = musl-gcc
|
#CC = musl-gcc
|
||||||
LD = $(CC)
|
LD = $(CC)
|
||||||
CPPFLAGS = -D_POSIX_C_SOURCE=200112L
|
CPPFLAGS = -D_POSIX_C_SOURCE=200112L
|
||||||
CFLAGS = -Os -ansi -Wall -pedantic $(CPPFLAGS)
|
CFLAGS = -Os -ansi -Wall -pedantic $(CPPFLAGS)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user