-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (31 loc) · 1.2 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
#! /usr/bin/make -f
CXX = g++ -std=c++17
MAGICK = $(shell pkg-config --cflags --libs Magick++)
CPPFLAGS = -DNDEBUG
CXXFLAGS = -Wall -O2 -Wextra $(shell pkg-config --cflags Magick++)
BIN = graphconv spriteconv petscii80x50 chargenconv petsciiconvert
.PHONY: all
all: $(BIN)
petscii80x50: petscii80x50.cc
$(CXX) -o $@ $+ $(MAGICK) $(CXXFLAGS) $(CPPFLAGS)
graphconv: graphconv.o change_ending.o
$(CXX) -o $@ $+ $(MAGICK) $(CXXFLAGS) $(CPPFLAGS)
chargenconv: chargenconv.o change_ending.o
$(CXX) -o $@ $+ $(MAGICK) $(CXXFLAGS) $(CPPFLAGS)
spriteconv: spriteconv_cli.o spriteconv.o
$(CXX) -o $@ $+ $(CXXFLAGS) $(CPPFLAGS) -lSDL2 -lSDL2_image
spriteconv_cli.c: spriteconv_cli.ggo
gengetopt -i $< -F spriteconv_cli -u
spriteconv_cli.o: spriteconv_cli.c spriteconv_cli.ggo
petsciiconvert_cli.c: petsciiconvert_cli.ggo
gengetopt -i $< -F $(basename $@) -u
petsciiconvert_cli.o: petsciiconvert_cli.c petsciiconvert_cli.ggo
petsciiconvert: petsciiconvert_cli.o parse-petsciifile.o compare_frames.o petsciiconvert.o
$(CXX) -o $@ $+ $(CXXFLAGS) $(CPPFLAGS)
.PHONY: clean install
clean:
rm -f $(BIN) *.o
rm -f *_cli.c *_cli.h
install:
install -d $(DESTDIR)/usr/local/bin
install $(BIN) $(DESTDIR)/usr/local/bin