diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2011-12-31 17:50:06 +0100 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2011-12-31 17:50:06 +0100 |
commit | 352dad23c7847d234e11c1034e1354fbd9a8349a (patch) | |
tree | 6caab2315dcb20882a05453412788578acc119e5 /Makefile | |
download | fmrxd-352dad23c7847d234e11c1034e1354fbd9a8349a.tar.gz fmrxd-352dad23c7847d234e11c1034e1354fbd9a8349a.zip |
initial import
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..07cc811 --- /dev/null +++ b/Makefile @@ -0,0 +1,44 @@ +CFLAGS?=-Os -Wall -ggdb +LDFLAGS?=-Wl,--as-needed +PREFIX?=/usr +DESTDIR?= + +FMRXD_PKGS:=glib-2.0 dbus-glib-1 bluez alsa +FMRXD_CFLAGS:=$(shell pkg-config --cflags $(FMRXD_PKGS)) +FMRXD_LIBS:=$(shell pkg-config --libs $(FMRXD_PKGS)) + +FMRXUTILS_PKGS:=glib-2.0 dbus-glib-1 +FMRXUTILS_CFLAGS:=$(shell pkg-config --cflags $(FMRXUTILS_PKGS)) +FMRXUTILS_LIBS:=$(shell pkg-config --libs $(FMRXUTILS_PKGS)) + +all: fmrxd fmrx-cat fmrx-ctl + +fmrxd: fmrxd.o server.o radio.o bt.o capture.o tuner.o rds.o + $(CC) $(FMRXD_LDFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS) $(FMRXD_LIBS) + +fmrx-cat: fmrx-cat.o + $(CC) $(FMRXUTILS_LDFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS) $(FMRXUTILS_LIBS) + +fmrx-ctl: fmrx-ctl.o + $(CC) $(FMRXUTILS_LDFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS) $(FMRXUTILS_LIBS) + +%.o: %.c + $(CC) $(FMRXD_CFLAGS) $(CFLAGS) -o $@ -c $< + +clean: + rm -f *.o fmrxd fmrx-cat fmrx-ctl + +install: fmrxd fmrx-cat fmrx-ctl + install -d $(DESTDIR)$(PREFIX)/sbin $(DESTDIR)$(PREFIX)/bin + install -d $(DESTDIR)$(PREFIX)/share/dbus-1/system-services + install -m 0755 fmrxd $(DESTDIR)$(PREFIX)/sbin + install -m 0755 fmrx-cat fmrx-ctl $(DESTDIR)$(PREFIX)/bin + install -m 0644 fmrxd.service \ + $(DESTDIR)$(PREFIX)/share/dbus-1/system-services/com.javispedro.fmrxd.service + +uninstall: + rm -f $(DESTDIR)$(PREFIX)/sbin/fmrxd + rm -f $(DESTDIR)$(PREFIX)/bin/fmrx-cat $(DESTDIR)$(PREFIX)/bin/fmrx-ctl + rm -f $(DESTDIR)$(PREFIX)/share/dbus-1/system-services/com.javispedro.fmrxd.service + +.PHONY: all clean install uninstall |