-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
38 lines (27 loc) · 891 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
VALAC=valac
DESTDIR?=/
PREFIX?=usr
#CFLAGS += -I/opt/local/include -I/usr/local/include
CFLAGS += $(shell pkg-config --cflags libjpeg)
#JPEGLIBS += -L/opt/local/lib -L/usr/local/lib -L/usr/local/Cellar -ljpeg
JPEGLIBS += $(shell pkg-config --libs libjpeg)
all: tiv stiv stiv-jpeg
stiv-jpeg: stiv-jpeg.o stiv.c
${CC} stiv-jpeg.o -o stiv-jpeg $(CFLAGS) ${JPEGLIBS}
stiv: stiv.o
${CC} stiv.o -o stiv
tiv: tiv.vala
${VALAC} tiv.vala --pkg gdk-3.0 --pkg linux
clean:
rm -f tiv stiv stiv-jpeg stiv-jpeg.static stiv-jpeg.o stiv.o
install:
cp tiv ${DESTDIR}/${PREFIX}/bin
cp stiv-jpeg ${DESTDIR}/${PREFIX}/bin
uninstall deinstall:
rm -f ${DESTDIR}/${PREFIX}/bin/tiv
rm -f ${DESTDIR}/${PREFIX}/bin/stiv-jpeg
test:
./tiv img/kodim23.jpg
.PHONY: all clean test install uninstall deinstall
osx:
${CC} -o stiv-jpeg.static stiv-jpeg.c -I /opt/local/include/ /opt/local/lib/libjpeg.a