-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
49 lines (38 loc) · 1.18 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
# See LICENSE file for copyright and license details.
.POSIX:
include config.mk
SRC_COMMON = st.c screen.c main.c font12.c font16.c font20.c font24.c font8.c
ifeq ($(SCREEN),75_V1)
SRC = $(SRC_COMMON) screen_75_v1.c
endif
ifeq ($(SCREEN),75_V2)
SRC = $(SRC_COMMON) screen_75_v2.c
endif
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) -DSCREEN_$(SCREEN) -c $<
ultimatewriter: $(OBJ)
$(CC) -o $@ $(OBJ) $(STLDFLAGS) -DSCREEN_$(SCREEN)
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