Package: gpscorrelate / 1.6.1-7

80-cross.patch Patch series | 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
Description: Makes gpscorrelate cross buildable.
Author: Helmut Grohne <helmut@subdivi.de>
Last-Update: 2018-06-10

--- gpscorrelate-1.6.1.orig/Makefile
+++ gpscorrelate-1.6.1/Makefile
@@ -2,13 +2,14 @@
 # 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
+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
+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
@@ -19,16 +20,16 @@
 all:	gpscorrelate gpscorrelate-gui gpscorrelate.1
 
 gpscorrelate: $(COBJS)
-	g++ -o $@ $(COBJS) $(OFLAGS_CON)
+	$(CXX) -o $@ $(COBJS) $(OFLAGS_CON)
 
 gpscorrelate-gui: $(GOBJS)
-	g++ -o $@ $(GOBJS) $(OFLAGS_GTK)
+	$(CXX) -o $@ $(GOBJS) $(OFLAGS_GTK)
 
 .c.o:
-	gcc $(CFLAGS) -c -o $*.o $<
+	$(CC) $(CFLAGS) -c -o $*.o $<
 
 .cpp.o:
-	g++ $(CFLAGS) -c -o $*.o $<
+	$(CXX) $(CFLAGS) -c -o $*.o $<
 
 clean:
 	rm -f *.o gpscorrelate gpscorrelate-gui doc/gpscorrelate-manpage.xml gpscorrelate.1