forked from picnoir/ultimate-writer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (32 loc) · 1.01 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
# See LICENSE file for copyright and license details.
.POSIX:
include config.mk
SRC = st.c screen.c main.c font12.c font16.c font20.c font24.c font8.c
OBJ = $(SRC:.c=.o)
all: options ultimatewriter
options:
@echo st build options:
@echo "CFLAGS = $(STCFLAGS)"
@echo "LDFLAGS = $(STLDFLAGS)"
@echo "CC = $(CC)"
${OBJ}: config.mk
.c.o:
$(CC) $(STCFLAGS) -c $<
ultimatewriter: $(OBJ)
$(CC) -o $@ $(OBJ) $(STLDFLAGS)
clean:
rm -f st $(OBJ)
install: ultimatewriter
cp -f ultimatewriter $(PREFIX)/bin
cp -f scripts/start-ultimatewriter $(PREFIX)/bin
cp -f scripts/stop-ultimatewriter $(PREFIX)/bin
cp -f systemd/ultimatewriter.service $(SYSTEMD_PREFIX)
chmod 755 $(PREFIX)/bin/ultimatewriter
chmod 755 $(PREFIX)/bin/start-ultimatewriter
chmod 755 $(PREFIX)/bin/stop-ultimatewriter
uninstall:
rm -f $(PREFIX)/bin/ultimatewriter
rm -f $(PREFIX)/bin/start-ultimatewriter
rm -f $(PREFIX)/bin/stop-ultimatewriter
rm -f $(SYSTEMD_PREFIX)/ultimatewriter.service
.PHONY: all options clean dist install uninstall