Makefile: help-target, install-target creates dirs, clean-target removes tarball.
This commit is contained in:
parent
b656dd48e5
commit
d81863c487
11
Makefile
11
Makefile
|
@ -5,6 +5,7 @@ RM ?= rm
|
||||||
LN ?= ln
|
LN ?= ln
|
||||||
MAKE ?= make
|
MAKE ?= make
|
||||||
MD ?= mkdir
|
MD ?= mkdir
|
||||||
|
MD_P ?= $(MD) -p
|
||||||
CP ?= cp
|
CP ?= cp
|
||||||
TAR ?= tar
|
TAR ?= tar
|
||||||
|
|
||||||
|
@ -15,19 +16,27 @@ CFLAGS ?= -Os
|
||||||
|
|
||||||
VERSION = $(shell cat VERSION)
|
VERSION = $(shell cat VERSION)
|
||||||
|
|
||||||
|
help:
|
||||||
|
@echo "Choose:"
|
||||||
|
@echo "make all - build all files"
|
||||||
|
@echo "make install - install isirc"
|
||||||
|
@echo "make tarball - build source-tarball"
|
||||||
|
@echo "make clean - removes build-files"
|
||||||
|
|
||||||
all: cmdline
|
all: cmdline
|
||||||
|
|
||||||
cmdline: cmdline.c
|
cmdline: cmdline.c
|
||||||
$(CC) $(CFLAGS) -o $@ -Dcmdline_main=main $<
|
$(CC) $(CFLAGS) -o $@ -Dcmdline_main=main $<
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
$(MD_P) $(D)/$(BIN_PREFIX)
|
||||||
$(INSTALL) -D -m 0755 cmdline $(D)/$(BIN_PREFIX)
|
$(INSTALL) -D -m 0755 cmdline $(D)/$(BIN_PREFIX)
|
||||||
$(INSTALL) -D -m 0744 isirc $(D)/$(BIN_PREFIX)
|
$(INSTALL) -D -m 0744 isirc $(D)/$(BIN_PREFIX)
|
||||||
$(LN) -s bin/isirc $(D)/init
|
$(LN) -s bin/isirc $(D)/init
|
||||||
$(LN) -s bin/isirc $(D)/linuxrc
|
$(LN) -s bin/isirc $(D)/linuxrc
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) cmdline target
|
$(RM) cmdline isirc-*.tar.xz
|
||||||
|
|
||||||
tarball:
|
tarball:
|
||||||
ls isirc Makefile cmdline.c | pax -s "!^!isirc-$(VERSION)/!" -w | xz > isirc-$(VERSION).tar.xz
|
ls isirc Makefile cmdline.c | pax -s "!^!isirc-$(VERSION)/!" -w | xz > isirc-$(VERSION).tar.xz
|
||||||
|
|
Loading…
Reference in a new issue