File: Makefile

package info (click to toggle)
gpscorrelate 1.6.1-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 936 kB
  • sloc: ansic: 1,781; cpp: 440; makefile: 61
file content (53 lines) | stat: -rw-r--r-- 1,832 bytes parent folder | download
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
# Makefile for gpscorrelate
# Written by Daniel Foote.


PKG_CONFIG ?= pkg-config
COBJS    = main-command.o unixtime.o gpx-read.o correlate.o exif-gps.o
GOBJS    = main-gui.o gui.o unixtime.o gpx-read.o correlate.o exif-gps.o
CFLAGS   = -Wall
override CFLAGS += $(shell $(PKG_CONFIG) --cflags libxml-2.0 gtk+-2.0) -I/usr/include/exiv2
OFLAGS   = -Wall
OFLAGS_CON = $(OFLAGS) -Wl,--as-needed $(shell $(PKG_CONFIG) --libs libxml-2.0) -lm -lexiv2
OFLAGS_GTK = $(OFLAGS) -Wl,--as-needed $(shell $(PKG_CONFIG) --libs libxml-2.0 gtk+-2.0) -lm -lexiv2
prefix   = /usr/local
bindir   = $(prefix)/bin
datadir  = $(prefix)/share
mandir   = $(datadir)/man
docdir   = $(datadir)/doc/gpscorrelate
applicationsdir = $(datadir)/applications

all:	gpscorrelate gpscorrelate-gui gpscorrelate.1

gpscorrelate: $(COBJS)
	$(CXX) -o $@ $(COBJS) $(OFLAGS_CON)

gpscorrelate-gui: $(GOBJS)
	$(CXX) -o $@ $(GOBJS) $(OFLAGS_GTK)

.c.o:
	$(CC) $(CFLAGS) -c -o $*.o $<

.cpp.o:
	$(CXX) $(CFLAGS) -c -o $*.o $<

clean:
	rm -f *.o gpscorrelate gpscorrelate-gui doc/gpscorrelate-manpage.xml gpscorrelate.1

install: all
	install -d $(DESTDIR)$(bindir)
	install gpscorrelate gpscorrelate-gui $(DESTDIR)$(bindir)
	install -d $(DESTDIR)$(mandir)/man1
	install -m 0644 gpscorrelate.1 $(DESTDIR)$(mandir)/man1
	install -d $(DESTDIR)$(docdir)
	install -m 0644 doc/*.html doc/*.png $(DESTDIR)$(docdir)

install-desktop-file:
	desktop-file-install --vendor="" --dir="$(DESTDIR)$(applicationsdir)" gpscorrelate.desktop
	install -p -m0644 -D gpscorrelate-gui.svg $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/gpscorrelate-gui.svg

doc/gpscorrelate-manpage.xml: doc/gpscorrelate-manpage.xml.in
	sed  's,@DOCDIR@,$(docdir),' $< > $@

gpscorrelate.1: doc/gpscorrelate-manpage.xml
	xsltproc --nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<