1 | | --- Makefile.orig 2011-12-08 21:20:05.000000000 +0100 |
2 | | +++ Makefile 2012-01-19 22:38:38.000000000 +0100 |
3 | | @@ -1,7 +1,6 @@ |
4 | | VERSION=1.2 |
5 | | |
6 | | -CC=gcc |
7 | | -CFLAGS=-Wall -Wno-pointer-sign -g |
8 | | +CFLAGS=-Wall -Wno-pointer-sign -g $(EXTRACFLAGS) |
| 1 | --- Makefile.orig 2013-02-20 21:06:34.000000000 +0100 |
| 2 | +++ Makefile 2013-02-20 22:48:49.000000000 +0100 |
| 3 | @@ -1,7 +1,7 @@ |
| 4 | VERSION=2.9 |
| 5 | |
| 6 | CC=gcc |
| 7 | -CFLAGS=-Wall -Wno-pointer-sign -g $(CLCFLAGS) -DGSEAL_ENABLE |
| 8 | +CFLAGS=-Wall -Wno-pointer-sign -g $(CLCFLAGS) -DGSEAL_ENABLE $(EXTRACFLAGS) |
21 | | @@ -25,7 +24,7 @@ |
22 | | MANFILES = $(NAME).1 |
23 | | XSLTFILES = xslt/*.xslt |
24 | | |
25 | | -MACOSXINSTALL = /Applications/Subsurface.app |
26 | | +MACOSXINSTALL = ${mpappdir}/Subsurface.app |
27 | | MACOSXFILES = packaging/macosx |
28 | | |
29 | | # find libdivecomputer |
30 | | @@ -35,40 +34,9 @@ |
31 | | # subdirectories of /usr/local and /usr and then we give up. You can |
32 | | # override by simply setting it here |
33 | | # |
34 | | -ifeq ($(CC), i686-w64-mingw32-gcc) |
35 | | -# ok, we are cross building for Windows |
36 | | - LIBDIVECOMPUTERDIR = /usr/i686-w64-mingw32/sys-root/mingw/include/libdivecomputer |
37 | | - LIBDIVECOMPUTERINCLUDES = `$(PKGCONFIG) --cflags libdivecomputer` |
38 | | - LIBDIVECOMPUTERARCHIVE = `$(PKGCONFIG) --libs libdivecomputer` |
39 | | - RESFILE = packaging/windows/subsurface.res |
40 | | - LDFLAGS += -Wl,-subsystem,windows |
41 | | -else |
42 | | - |
| 21 | @@ -53,8 +53,8 @@ |
| 22 | LIBDIVECOMPUTERINCLUDES = $(shell $(PKGCONFIG) --cflags libdivecomputer) |
| 23 | LIBDIVECOMPUTERARCHIVE = $(shell $(PKGCONFIG) --libs libdivecomputer) |
| 24 | else |
45 | | -libdc-usr := $(wildcard /usr/lib/libdivecomputer.a) |
46 | | -libdc-usr64 := $(wildcard /usr/lib64/libdivecomputer.a) |
47 | | - |
48 | | -ifneq ($(strip $(libdc-local)),) |
49 | | - LIBDIVECOMPUTERDIR = /usr/local |
50 | | - LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include/libdivecomputer |
51 | | - LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a |
52 | | -else ifneq ($(strip $(libdc-local64)),) |
53 | | - LIBDIVECOMPUTERDIR = /usr/local |
54 | | - LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include/libdivecomputer |
55 | | - LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib64/libdivecomputer.a |
56 | | -else ifneq ($(strip $(libdc-usr)),) |
57 | | - LIBDIVECOMPUTERDIR = /usr |
58 | | - LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include/libdivecomputer |
59 | | - LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a |
60 | | -else ifneq ($(strip $(libdc-usr64)),) |
61 | | - LIBDIVECOMPUTERDIR = /usr |
62 | | - LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include/libdivecomputer |
63 | | - LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib64/libdivecomputer.a |
64 | | -else |
65 | | -$(error Cannot find libdivecomputer - please edit Makefile) |
66 | | -endif |
67 | | -endif |
68 | | +LIBDIVECOMPUTERDIR = ${mpprefix} |
69 | | +LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include/libdivecomputer |
70 | | +LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a |
71 | | |
72 | | # Libusb-1.0 is only required if libdivecomputer was built with it. |
73 | | # And libdivecomputer is only built with it if libusb-1.0 is |
74 | | @@ -116,6 +84,8 @@ |
75 | | parse-xml.o save-xml.o libdivecomputer.o print.o uemis.o \ |
76 | | gtk-gui.o statistics.o $(OSSUPPORT).o $(RESFILE) |
77 | | |
78 | | +all: $(NAME) |
79 | | + |
80 | | $(NAME): $(OBJS) |
81 | | $(CC) $(LDFLAGS) -o $(NAME) $(OBJS) $(LIBS) |
82 | | |
| 27 | +libdc-local := $(wildcard $(prefix)/lib/libdivecomputer.a) |
| 28 | +libdc-local64 := $(wildcard $prefix)/lib64/libdivecomputer.a) |
| 29 | libdc-usr := $(wildcard /usr/lib/libdivecomputer.a) |
| 30 | libdc-usr64 := $(wildcard /usr/lib64/libdivecomputer.a) |
| 31 | |
| 32 | @@ -122,7 +122,7 @@ |
| 33 | else ifeq ($(UNAME), darwin) |
| 34 | OSSUPPORT = macos |
| 35 | OSSUPPORT_CFLAGS = $(GTKCFLAGS) |
| 36 | - MACOSXINSTALL = /Applications/Subsurface.app |
| 37 | + MACOSXINSTALL = ${mpappdir}/Subsurface.app |
| 38 | MACOSXFILES = packaging/macosx |
| 39 | MACOSXSTAGING = $(MACOSXFILES)/Subsurface.app |
| 40 | INFOPLIST = $(MACOSXFILES)/Info.plist |