From: Gregor Riepl Date: Tue, 27 Jul 2010 20:32:55 +0000 (+0200) Subject: Made a new makefile for scratchbox builds X-Git-Tag: v0.1~2 X-Git-Url: https://vcs.maemo.org/git/?p=mtetherd;a=commitdiff_plain;h=10270ccbec41e89950dfa01b4a2a3fc1949c7a3a Made a new makefile for scratchbox builds Fixed errors in MADDE makefile Updated readme with bug report info Fixed path in event script --- diff --git a/Makefile b/Makefile index 663a47d..5cc417f 100644 --- a/Makefile +++ b/Makefile @@ -1,29 +1,27 @@ -MAD = mad CC = gcc -CFLAGS = -Wall -O0 -g -D_GNU_SOURCE -INCLUDES = -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -LDFLAGS = -g -LIBS = -ldbus-1 -lpthread -SSH_ADDRESS = developer@192.168.253.254 -SSH_SCP = scp -SSH_SSH = ssh -SSH_PATH = /home/developer -DATA_FILES = main.c device.c device.h event.d-mtetherd +CFLAGS = -Wall -O2 -g -D_GNU_SOURCE +INCLUDES = $(shell pkg-config dbus-1 --cflags) +LDFLAGS = +LIBS = $(shell pkg-config dbus-1 --libs) +PREFIX = /usr mtetherd: mtetherd.o device.o - $(MAD) $(CC) $(LDFLAGS) $(LIBS) -o $@ $^ + $(CC) $(LDFLAGS) $(LIBS) -o $@ $^ -%PHONY: copy run clean +%PHONY: clean install uninstall -copy: mtetherd $(DATA_FILES) - $(SSH_SCP) $^ $(SSH_ADDRESS):$(SSH_PATH) +clean: + rm -f *.o mtetherd -run: copy - $(SSH_SSH) $(SSH_ADDRESS) $(SSH_PATH)/maemo-tethering +install: mtetherd + install -m 755 -D mtetherd $(PREFIX)/sbin/mtetherd + install -m 644 -D event.d-mtetherd /etc/event.d/mtetherd + install -m 644 -D README $(PREFIX)/share/doc/mtetherd/README -clean: - rm -f *.o maemo-tethering +uninstall: + rm -f $(PREFIX)/sbin/mtetherd + rm -f /etc/event.d/mtetherd + rm -rf $(PREFIX)/share/doc/mtetherd %.o: %.c - $(MAD) $(CC) $(CFLAGS) $(INCLUDES) -o $@ -c $^ - + $(CC) $(CFLAGS) $(INCLUDES) -o $@ -c $^ diff --git a/Makefile.madde b/Makefile.madde new file mode 100644 index 0000000..5c951b9 --- /dev/null +++ b/Makefile.madde @@ -0,0 +1,29 @@ +MAD = mad +CC = gcc +CFLAGS = -Wall -O0 -g -D_GNU_SOURCE +INCLUDES = -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include +LDFLAGS = -g +LIBS = -ldbus-1 -lpthread +SSH_ADDRESS = developer@192.168.253.254 +SSH_SCP = scp +SSH_SSH = ssh +SSH_PATH = /home/developer +DATA_FILES = main.c device.c device.h event.d-mtetherd + +mtetherd: mtetherd.o device.o + $(MAD) $(CC) $(LDFLAGS) $(LIBS) -o $@ $^ + +%PHONY: copy run clean + +copy: mtetherd $(DATA_FILES) + $(SSH_SCP) $^ $(SSH_ADDRESS):$(SSH_PATH) + +run: copy + $(SSH_SSH) $(SSH_ADDRESS) $(SSH_PATH)/mtetherd + +clean: + rm -f *.o mtetherd + +%.o: %.c + $(MAD) $(CC) $(CFLAGS) $(INCLUDES) -o $@ -c $^ + diff --git a/README b/README index ada9d53..18418ae 100644 --- a/README +++ b/README @@ -55,8 +55,9 @@ connection is available. Bugs: -Likely. -Please submit a bug report on garage.maemo.org if you find any! +If you find any, please report them via the Maemo Garage bug tracker at +https://garage.maemo.org/projects/mtetherd/ or send an email to +onitake@gmail.com Legal: diff --git a/event.d-mtetherd b/event.d-mtetherd index cf4dd9d..c3e118e 100644 --- a/event.d-mtetherd +++ b/event.d-mtetherd @@ -1,4 +1,4 @@ -description "maemo-tethering" +description "Maemo Tethering Daemon" author "Gregor Riepl " start on started dbus @@ -6,7 +6,7 @@ stop on stopping dbus console none -exec /usr/sbin/maemo-tethering +exec /usr/sbin/mtetherd respawn