-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (39 loc) · 1.11 KB
/
Makefile
File metadata and controls
52 lines (39 loc) · 1.11 KB
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
CXX = g++
CXXFLAGS = -O3
LDFLAGS = -lm
OBJ = paste.o board.o sha256.o
all: genpaste pastein newbored pasteout recompress heatmap
genpaste: $(OBJ) genpaste.o
$(CXX) -o $@ $(CXXFLAGS) $^ $(LDFLAGS)
pastein: $(OBJ) pastein.o
$(CXX) -o $@ $(CXXFLAGS) $^ $(LDFLAGS)
pasteout: $(OBJ) pasteout.o
$(CXX) -o $@ $(CXXFLAGS) $^ $(LDFLAGS)
newbored: $(OBJ) newbored.o
$(CXX) -o $@ $(CXXFLAGS) $^ $(LDFLAGS)
recompress: $(OBJ) recompress.o
$(CXX) -o $@ $(CXXFLAGS) $^ $(LDFLAGS)
heatmap: $(OBJ) heatmap.o
$(CXX) -o $@ $(CXXFLAGS) $^ $(LDFLAGS)
%.o: %.c
$(CXX) -o $@ $(CXXFLAGS) -c $^
%: %.gz
gzip -dc $^ > $@
.PHONY: clean
clean:
rm -f $(OBJ) genpaste.o pasteout.o newbored.o pastein.o recompress.o heatmap.o
rm -f genpaste pasteout newbored pastein recompress heatmap
# for Ubuntu 16.04 LTS Google Cloud instance
.PHONY: setup
setup:
apt-get -y update
apt-get -y install apache2
apt-get -y install make
apt-get -y install g++
apt-get -y install imagemagick
.PHONY: boreds
boreds:
./newbored main main 1024 1024 86400
./newbored news news 1024 2048 86400
./newbored test test 512 512 3600
chmod 755 main news test