forked from akkana/pho
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
68 lines (46 loc) · 1.47 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Makefile for pho
VERSION = 1.0pre1
# Locate the gtk/gdk libraries (thanks to nev for this!)
GTKFLAGS := $(shell pkg-config --cflags gtk+-2.0 gdk-2.0 2> /dev/null)
CFLAGS += -g -Wall -pedantic -DVERSION='"$(VERSION)"' $(GTKFLAGS)
XLIBS := $(shell pkg-config --libs gtk+-2.0 > /dev/null)
GLIBS := $(shell pkg-config --libs gtk+-2.0 gdk-2.0)
CWD = $(shell pwd)
CWDBASE = $(shell basename `pwd`)
INSTALL = /usr/bin/install -D
INSTALLPREFIX = ${DESTDIR}/usr/local
TARFILE = pho-$(VERSION).tar.gz
EXIFLIB = exif/libphoexif.a -lm
SRCS = pho.c gmain.c phoimglist.c gwin.c imagenote.c gdialogs.c keydialog.c
# winman.c
OBJS = $(subst .c,.o,$(SRCS))
pho: $(EXIFLIB) $(OBJS)
$(CC) -o $@ $(OBJS) $(EXIFLIB) $(GLIBS) $(LDFLAGS) -lm
cflags:
echo $(CFLAGS)
all: pho xpho
$(EXIFLIB): exif/*.c
(cd exif && $(MAKE))
tar: clean $(TARFILE)
$(TARFILE):
( make clean && \
cd .. && \
tar czvf $(TARFILE) --exclude=.svn --exclude=.git --owner=root $(CWDBASE) && \
mv $(TARFILE) $(CWD) && \
echo Created $(TARFILE) \
)
rpm: $(TARFILE)
cp $(TARFILE) /usr/src/redhat/SOURCES/$(TARFILE)
rpm -ba pho.spec
cp /usr/src/redhat/RPMS/i386/pho-$(VERSION)*.rpm .
cp /usr/src/redhat/SRPMS/pho-$(VERSION)*.rpm .
deb: pho
dpkg-buildpackage -rfakeroot
install: pho
$(INSTALL) pho $(INSTALLPREFIX)/bin/pho
$(INSTALL) doc/pho.1 $(INSTALLPREFIX)/man/man1/pho.1
clean:
rm -f *.[oas] *.ld core* pho xpho pho-*.tar.gz *.rpm
rm -f build-stamp configure-stamp
rm -rf debian/pho
cd exif; make clean