2011-08-30 21:36:34 +00:00
|
|
|
CC=gcc
|
|
|
|
CFLAGS=-Wall -Wno-pointer-sign -g
|
|
|
|
|
2011-09-12 16:19:21 +00:00
|
|
|
LIBDIVECOMPUTERDIR = /usr/local
|
|
|
|
LIBDIVECOMPUTERINCLUDES = $(LIBDIVECOMPUTERDIR)/include/libdivecomputer
|
|
|
|
LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a
|
|
|
|
|
|
|
|
OBJS = main.o dive.o profile.o info.o equipment.o divelist.o \
|
|
|
|
parse-xml.o save-xml.o libdivecomputer.o
|
2011-08-31 17:20:46 +00:00
|
|
|
|
2011-09-01 17:09:53 +00:00
|
|
|
divelog: $(OBJS)
|
2011-09-04 17:01:37 +00:00
|
|
|
$(CC) $(LDFLAGS) -o divelog $(OBJS) \
|
2011-09-01 17:09:53 +00:00
|
|
|
`xml2-config --libs` \
|
2011-09-12 16:19:21 +00:00
|
|
|
`pkg-config --libs gtk+-2.0 glib-2.0 gconf-2.0` \
|
|
|
|
$(LIBDIVECOMPUTERARCHIVE)
|
2011-08-31 01:40:25 +00:00
|
|
|
|
2011-09-01 17:09:53 +00:00
|
|
|
parse-xml.o: parse-xml.c dive.h
|
2011-09-05 20:14:53 +00:00
|
|
|
$(CC) $(CFLAGS) `pkg-config --cflags glib-2.0` -c `xml2-config --cflags` parse-xml.c
|
2011-08-31 01:40:25 +00:00
|
|
|
|
2011-09-01 23:27:52 +00:00
|
|
|
save-xml.o: save-xml.c dive.h
|
2011-09-05 20:14:53 +00:00
|
|
|
$(CC) $(CFLAGS) `pkg-config --cflags glib-2.0` -c save-xml.c
|
2011-09-01 23:27:52 +00:00
|
|
|
|
2011-09-03 20:19:26 +00:00
|
|
|
dive.o: dive.c dive.h
|
2011-09-05 20:14:53 +00:00
|
|
|
$(CC) $(CFLAGS) `pkg-config --cflags glib-2.0` -c dive.c
|
2011-09-03 20:19:26 +00:00
|
|
|
|
2011-09-05 19:12:58 +00:00
|
|
|
main.o: main.c dive.h display.h divelist.h
|
2011-09-08 18:23:11 +00:00
|
|
|
$(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0 glib-2.0 gconf-2.0` \
|
|
|
|
-c main.c
|
2011-08-31 17:20:46 +00:00
|
|
|
|
2011-09-05 19:12:58 +00:00
|
|
|
profile.o: profile.c dive.h display.h divelist.h
|
2011-09-05 20:14:53 +00:00
|
|
|
$(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0 glib-2.0` -c profile.c
|
2011-08-31 17:27:58 +00:00
|
|
|
|
2011-09-05 19:12:58 +00:00
|
|
|
info.o: info.c dive.h display.h divelist.h
|
2011-09-05 20:14:53 +00:00
|
|
|
$(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0 glib-2.0` -c info.c
|
2011-08-31 19:09:19 +00:00
|
|
|
|
2011-09-10 00:10:17 +00:00
|
|
|
equipment.o: equipment.c dive.h display.h divelist.h
|
|
|
|
$(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0 glib-2.0` -c equipment.c
|
2011-09-09 15:38:48 +00:00
|
|
|
|
2011-09-05 19:12:58 +00:00
|
|
|
divelist.o: divelist.c dive.h display.h divelist.h
|
2011-09-05 20:14:53 +00:00
|
|
|
$(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0 glib-2.0` -c divelist.c
|
2011-09-12 16:19:21 +00:00
|
|
|
|
|
|
|
libdivecomputer.o: libdivecomputer.c dive.h display.h
|
|
|
|
$(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0 glib-2.0` \
|
|
|
|
-I$(LIBDIVECOMPUTERINCLUDES) \
|
|
|
|
-c libdivecomputer.c
|