2011-08-30 21:36:34 +00:00
|
|
|
CC=gcc
|
|
|
|
CFLAGS=-Wall -Wno-pointer-sign -g
|
|
|
|
|
2011-09-03 20:19:26 +00:00
|
|
|
OBJS=main.o dive.o profile.o info.o divelist.o parse-xml.o save-xml.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-05 20:14:53 +00:00
|
|
|
`pkg-config --libs gtk+-2.0 glib-2.0`
|
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-05 20:14:53 +00:00
|
|
|
$(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0 glib-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-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
|