-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (37 loc) · 853 Bytes
/
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
CC = gcc
CCFLAGS = -I /usr/include/postgresql -L /usr/lib/ -lpq \
-Wall -Wextra -Wconversion \
-Wno-unused-variable -Wno-unused-parameter
PREFIX?=/usr/local
BINDIR=$(PREFIX)/bin
DATADIR=/usr/share/retrolire
bin=./bin/retrolire
all:
@make clean
@make $(bin)
$(bin): config.h bin
$(CC) src/*.c -o $(bin) $(CCFLAGS)
$(BINDIR):
mkdir $(BINDIR)
$(DATADIR):
mkdir $(DATADIR)
install: ./bin/retrolire $(BINDIR) $(DATADIR)
sudo cp $(bin) $(BINDIR)
sudo cp ./bash/protolire $(BINDIR)
cp ./bash/completion.bash ./schema.sql -r templates $(DATADIR)/
uninstall:
sudo rm -rf $(BINDIR)/retrolire $(BINDIR)/protolire $(DATADIR)
install-pipx:
pipx install .
uninstall-pipx:
pipx uninstall retrolire
bin:
mkdir bin
config.h:
cp config.def.h config.h
.PHONY: clean run
run:
./bin/retrolire
clean:
rm -f src/*.o src/*.gch
rm -f $(bin)