diff --git a/Makefile b/Makefile index 01b5360..ea9ac9d 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,8 @@ +# +# Makefile for usqlite +# + +.PHONY: all clean opkg release MAKE=gmake @@ -15,7 +20,6 @@ CFLAGS=-g -std=c99 INCS= LIBS= #CFLAGS=-g -O3 -fno-strict-aliasing -#WARN=-pedantic -Wall -Wnested-externs -Wpointer-arith -Werror -Wno-unused WARN=-pedantic -Wall -W -Wnested-externs -Wpointer-arith -Wno-long-long PLATFORM=$(shell uname -s | cut -d- -f1) @@ -25,10 +29,6 @@ endif all: usqlite -install: usqlite - strip $< - cp $< /mod/bin/ - usqlite: ${OBJS} @echo "Linking..." @-[ -f $@ ] && mv $@ $@~ || exit 0 @@ -41,16 +41,27 @@ usqlite: ${OBJS} @echo "Done..." clean: - @-touch core rm -f usqlite usqlite~ core ${OBJS} -#tags: -# @-ctags *.[ch] 2>> /dev/null - .c.o: @echo " $<" @$(CC) $(CFLAGS) ${WARN} ${DEFS} ${INCS} -c $< -o $@ ${OBJS}: ${HDRS} +usqlite.stripped: usqlite + strip -o $@ $< + +install: usqlite.stripped + install $< /mod/bin/$(basename $(notdir $<)) + +opkg: usqlite.stripped $(wildcard opkg/CONTROL/*) + install -D -p usqlite opkg/boot/$(basename $(notdir $<)) + opkg-pack opkg + +release: opkg + tagname=$$(echo usqlite*.opk | sed -n 'p;q') && \ + tagname="$${tagname%_*.*}" && \ + test -n "$${tagname}" && \ + git tag -f -a -m "Release $${tagname}" "$${tagname}" diff --git a/opkg/CONTROL/control b/opkg/CONTROL/control new file mode 100644 index 0000000..e343ebb --- /dev/null +++ b/opkg/CONTROL/control @@ -0,0 +1,8 @@ +Package: usqlite +Priority: optional +Section: database +Version: 0.3 +Architecture: mipsel +Maintainer: fieldhouse@gmx.net +Depends: +Description: Minimal SQLite exec tool diff --git a/opkg/boot/usqlite b/opkg/boot/usqlite new file mode 100755 index 0000000..03e4519 Binary files /dev/null and b/opkg/boot/usqlite differ