isirc/Makefile

36 lines
610 B
Makefile
Raw Normal View History

2012-05-21 00:14:49 +02:00
CC ?= cc
INSTALL ?= install
RM ?= rm
2012-06-02 10:09:16 +02:00
LN ?= ln
MAKE ?= make
MD ?= mkdir
CP ?= cp
TAR ?= tar
2012-05-21 00:14:49 +02:00
D ?= /
PREFIX ?= /
BIN_PREFIX ?= $(PREFIX)/bin
CFLAGS ?= -Os
2012-06-02 10:09:16 +02:00
VERSION = $(shell cat VERSION)
2012-05-21 00:14:49 +02:00
all: cmdline
cmdline: cmdline.c
$(CC) $(CFLAGS) -o $@ -Dcmdline_main=main $<
install:
$(INSTALL) -D -m 0755 cmdline $(D)/$(BIN_PREFIX)
$(INSTALL) -D -m 0744 isirc $(D)/$(BIN_PREFIX)
2012-06-02 10:09:16 +02:00
$(LN) -s bin/isirc $(D)/init
$(LN) -s bin/isirc $(D)/linuxrc
2012-05-21 00:14:49 +02:00
clean:
2012-06-02 10:09:16 +02:00
$(RM) cmdline target
tarball:
ls isirc Makefile cmdline.c | pax -s "!^!isirc-$(VERSION)/!" -w | xz > isirc-$(VERSION).tar.xz
2012-05-21 00:14:49 +02:00
2012-06-02 10:09:16 +02:00
.PHONY: all install clean tarball