mirror of
https://github.com/tat3r/tdfiglet.git
synced 2024-11-21 23:56:41 +00:00
added install target
This commit is contained in:
parent
54abc1114b
commit
8496e64dc5
14
Makefile
14
Makefile
@ -1,7 +1,10 @@
|
||||
PROG := tdfiglet
|
||||
SRC := tdfiglet.c
|
||||
PREFIX ?= /usr/local
|
||||
FONTS := fonts/*
|
||||
FONTDIR := $(PREFIX)/share/$(PROG)/fonts
|
||||
CC ?= cc
|
||||
CFLAGS += -std=c99 -Wall
|
||||
CFLAGS += -DFONT_DIR=\"$(FONTDIR)\" -std=c99 -Wall
|
||||
|
||||
UNAME := $(shell sh -c 'uname -s 2>/dev/null')
|
||||
|
||||
@ -13,10 +16,17 @@ endif
|
||||
default: $(SRC)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) $(SRC) -o $(PROG)
|
||||
|
||||
.PHONY: debug clean
|
||||
.PHONY: debug clean install
|
||||
|
||||
install:
|
||||
install -m 0755 -d $(PREFIX)/bin
|
||||
install -m 0755 -d $(FONTDIR)
|
||||
install -m 0755 $(PROG) $(PREFIX)/bin/$(PROG)
|
||||
for i in $(FONTS) ; do install -m 0644 $$i $(FONTDIR) ; done
|
||||
|
||||
debug: $(SRC)
|
||||
$(CC) -DDEBUG -g $(CFLAGS) $(LDFLAGS) $(SRC) -o $(PROG)
|
||||
|
||||
clean:
|
||||
rm -rf $(PROG) $(PROG).dSYM
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user