aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 744822275751af87f9ecb7d71f8e8e5e2a41846b (plain)
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
VERSION = 0.0
PREFIX = /usr/local
CC = cc
DIR = src
OBJS = $(DIR)/calp.o $(DIR)/draw.o $(DIR)/date.o $(DIR)/image.o
.PHONY: clean all install

TARGET = calp

CFLAGS = `pkgconf --cflags pangocairo MagickWand` -O2 -g -Wall -Werror -Wextra -Winit-self -Wuninitialized -pedantic
LFLAGS = `pkgconf --libs pangocairo MagickWand` -lm

all: $(TARGET)

$(TARGET): $(OBJS)
	$(CC) $(CFLAGS) -o $(TARGET) $(OBJS) $(LFLAGS)

clean:
	-rm -f $(OBJS) calp

install: all
	mkdir -p ${DESTDIR}${PREFIX}/bin
	cp -f calp ${DESTDIR}${PREFIX}/bin
	chmod 755 ${DESTDIR}${PREFIX}/bin/calp

uninstall:
	rm -f ${DESTDIR}${PREFIX}/bin/calp