archive- Random tools & helpful resources for IRC |
git clone git://git.acid.vegas/archive.git |
Log | Files | Refs | Archive |
Makefile (847B)
1 PROG := tdfiglet 2 SRC := tdfiglet.c 3 PREFIX ?= /usr/local 4 FONTS := fonts/* 5 FONTDIR := $(PREFIX)/share/$(PROG)/fonts 6 CC ?= cc 7 CFLAGS += -DFONT_DIR=\"$(FONTDIR)\" -std=c99 -Wall 8 DFLAGS = -g 9 UNAME := $(shell sh -c 'uname -s 2>/dev/null') 10 11 ifeq ($(UNAME), Darwin) 12 CC = clang 13 CFLAGS += -Wunused-result -Wunused-value 14 DLAGS += -fsanitize=address -fsanitize=undefined -fsanitize=leak 15 LDFLAGS += -liconv 16 endif 17 18 default: $(SRC) 19 $(CC) $(CFLAGS) $(LDFLAGS) $(SRC) -o $(PROG) 20 21 .PHONY: debug clean install 22 23 install: 24 test -d $(PREFIX)/bin || mkdir -p $(PREFIX)/bin 25 cp $(PROG) $(PREFIX)/bin 26 test -d $(FONTDIR) || mkdir -p $(FONTDIR) 27 rm -f $(FONTDIR)/*.tdf 28 for i in $(FONTS) ; do cp -v $$i $(FONTDIR) ; done 29 chmod ugo+r $(FONTDIR)/*.tdf 30 31 debug: $(SRC) 32 $(CC) -DDEBUG $(CFLAGS) $(DFLAGS) $(LDFLAGS) $(SRC) -o $(PROG) 33 34 clean: 35 rm -rf $(PROG) $(PROG).dSYM 36