2 CFLAGS=-Wall -Wno-pointer-sign -g
4 LIBDIVECOMPUTERDIR = /usr/local
5 LIBDIVECOMPUTERINCLUDES = $(LIBDIVECOMPUTERDIR)/include/libdivecomputer
6 LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a
8 # Add libusb in case of libdivecomputer compiled with usb support.
9 LIBS = `pkg-config --libs gtk+-2.0 glib-2.0 gconf-2.0`
11 OBJS = main.o dive.o profile.o info.o equipment.o divelist.o \
12 parse-xml.o save-xml.o libdivecomputer.o print.o uemis.o \
16 $(CC) $(LDFLAGS) -o subsurface $(OBJS) \
17 `xml2-config --libs` $(LIBS) \
18 $(LIBDIVECOMPUTERARCHIVE) -lpthread
20 parse-xml.o: parse-xml.c dive.h
21 $(CC) $(CFLAGS) `pkg-config --cflags glib-2.0` -c `xml2-config --cflags` parse-xml.c
23 save-xml.o: save-xml.c dive.h
24 $(CC) $(CFLAGS) `pkg-config --cflags glib-2.0` -c save-xml.c
27 $(CC) $(CFLAGS) `pkg-config --cflags glib-2.0` -c dive.c
29 main.o: main.c dive.h display.h divelist.h
30 $(CC) $(CFLAGS) `pkg-config --cflags glib-2.0 gconf-2.0` \
33 profile.o: profile.c dive.h display.h divelist.h
34 $(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0 glib-2.0` -c profile.c
36 info.o: info.c dive.h display.h display-gtk.h divelist.h
37 $(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0 glib-2.0` -c info.c
39 equipment.o: equipment.c dive.h display.h divelist.h
40 $(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0 glib-2.0` -c equipment.c
42 divelist.o: divelist.c dive.h display.h divelist.h
43 $(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0 glib-2.0` -c divelist.c
45 print.o: print.c dive.h display.h display-gtk.h
46 $(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0 glib-2.0` -c print.c
48 libdivecomputer.o: libdivecomputer.c dive.h display.h display-gtk.h libdivecomputer.h
49 $(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0 glib-2.0` \
50 -I$(LIBDIVECOMPUTERINCLUDES) \
53 gtk-gui.o: gtk-gui.c dive.h display.h divelist.h display-gtk.h libdivecomputer.h
54 $(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0 glib-2.0 gconf-2.0` \
55 -I$(LIBDIVECOMPUTERINCLUDES) \
58 uemis.o: uemis.c uemis.h
59 $(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0 glib-2.0` -c uemis.c