wm: ticl

ref: 8c6dee8c450f9a7d9b97e51d47429d353a42ff9d
dir: /Makefile/

View raw version
# This work is dedicated to the public domain.
# See COPYING file for more information.

include config.mk

OUT = ticl
SRC = main.c htable.c
OBJ = $(SRC:.c=.o)

all: clean $(OUT)

.c.o:
	$(CC) -c $(CFLAGS) $<

$(OUT): $(OBJ)
	$(CC) -o $@ $(OBJ) $(LDFLAGS)

clean:
	rm -f $(OUT) $(OBJ) $(OUT)-*.tar.gz

dist: clean
	mkdir -p $(OUT)-$(VERSION)
	cp -R README COPYING Makefile config.mk htable.h util.c $(SRC)\
		$(OUT)-$(VERSION)
	tar -cf	$(OUT)-$(VERSION).tar $(OUT)-$(VERSION)
	gzip $(OUT)-$(VERSION).tar
	rm -rf $(OUT)-$(VERSION)

install: all
	mkdir -p $(DESTDIR)$(PREFIX)/bin
	cp -f $(OUT) $(DESTDIR)$(PREFIX)/bin
	chmod 755 $(DESTDIR)$(PREFIX)/bin/$(OUT)

uninstall:
	rm -f $(DESTDIR)$(PREFIX)/bin/$(OUT)

.PHONY: all clean dist install uninstall