Initial commit
[gps-tracker] / Makefile
1 # define a list of pkg-config packages we want to use
2 pkg_packages := gtk+-2.0 hildon-1 liblocation
3
4 # get the necessary flags for compiling
5 PKG_CFLAGS := $(shell pkg-config --cflags $(pkg_packages))
6 # get the necessary flags for linking
7 PKG_LDFLAGS := $(shell pkg-config --libs $(pkg_packages))
8
9 # additional flags
10 # -Wall: warnings
11 # -g: debugging
12 ADD_CFLAGS := -Wall -g
13
14 # combine the flags (so that CFLAGS/LDFLAGS from the command line
15 # still work).
16 CFLAGS  := $(PKG_CFLAGS) $(ADD_CFLAGS) $(CFLAGS)
17 LDFLAGS := $(PKG_LDFLAGS) $(LDFLAGS)
18
19 targets = gps-tracker
20
21 .PHONY: all
22 all: $(targets)
23
24 gps-tracker: gps-tracker.o
25         $(CC) $^ -o $@ $(LDFLAGS)
26
27 .PHONY: clean
28 clean:
29         $(RM) $(targets) *.o
30
31 run: $(targets)
32         run-standalone.sh `pwd`/gps-tracker