This repository has been archived by the owner on Jan 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
60 lines (46 loc) · 1.47 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# flarity - A personal terminal emulator.
# See LICENSE file for copyright and license details.
.POSIX:
include config.mk
SRC = flarity.c x.c boxdraw.c hb.c
OBJ = $(SRC:.c=.o)
all: options flarity
options:
@echo flarity build options:
@echo "CFLAGS = $(STCFLAGS)"
@echo "LDFLAGS = $(STLDFLAGS)"
@echo "CC = $(CC)"
config.h:
cp config.def.h config.h
.c.o:
$(CC) $(STCFLAGS) -c $<
flarity.o: config.h flarity.h win.h
x.o: arg.h config.h flarity.h win.h hb.h
hb.o: flarity.h
boxdraw.o: config.h flarity.h boxdraw_data.h
$(OBJ): config.h config.mk
flarity: $(OBJ)
$(CC) -o $@ $(OBJ) $(STLDFLAGS)
clean:
rm -f flarity $(OBJ) flarity-$(VERSION).tar.gz
dist: clean
mkdir -p flarity-$(VERSION)
cp -R FAQ LEGACY TODO LICENSE Makefile README config.mk\
config.def.h flarity.info flarity.1 arg.h flarity.h win.h $(SRC)\
flarity-$(VERSION)
tar -cf - flarity-$(VERSION) | gzip > flarity-$(VERSION).tar.gz
rm -rf flarity-$(VERSION)
install: flarity
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f flarity $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/flarity
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
sed "s/VERSION/$(VERSION)/g" < flarity.1 > $(DESTDIR)$(MANPREFIX)/man1/flarity.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/flarity.1
tic -sx flarity.info
rm -f *.o
@echo Please see the README file regarding the terminfo entry of flarity.
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/flarity
rm -f $(DESTDIR)$(MANPREFIX)/man1/flarity.1
.PHONY: all options clean dist install uninstall