diff --git a/Makefile b/Makefile index 219819b..f3b7938 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,14 @@ ARCHS=armv7 arm64 CFLAGS+=-I. CFLAGS+=-Wall +include config.mk +CFLAGS+=-DFSMON_VERSION=\"$(VERSION)\" + SOURCES=main.c util.c SOURCES+=backend/*.c ifeq ($(shell uname),Linux) + # LINUX: GNU / ANDROID # __ # -=(o '. @@ -14,6 +18,7 @@ ifeq ($(shell uname),Linux) # /| \\ # '| || # _\_):,_ + FANOTIFY_CFLAGS+=-DHAVE_FANOTIFY=1 FANOTIFY_CFLAGS+=-DHAVE_SYS_FANOTIFY=1 diff --git a/config.mk b/config.mk new file mode 100644 index 0000000..e7a9389 --- /dev/null +++ b/config.mk @@ -0,0 +1 @@ +VERSION=1.6.1 diff --git a/cydia/CONFIG b/cydia/CONFIG index cf132c0..9787658 100644 --- a/cydia/CONFIG +++ b/cydia/CONFIG @@ -1,5 +1,5 @@ PACKAGE=fsmon -VERSION=1.6 +include ../config.mk ARCH=iphoneos-arm SECTION=user/shell PRIORITY=optional diff --git a/fsmon.h b/fsmon.h index cfaa0e4..4d5d3d6 100644 --- a/fsmon.h +++ b/fsmon.h @@ -1,7 +1,9 @@ #ifndef INCLUDE_FM_FSMON_H #define INCLUDE_FM_FSMON_H -#define FSMON_VERSION "1.6" +#ifndef FSMON_VERSION +#error FSMON_VERSION is not defined +#endif #include #include diff --git a/pkg.sh b/pkg.sh index 05a7b84..e31e787 100755 --- a/pkg.sh +++ b/pkg.sh @@ -9,9 +9,8 @@ DESTDIR=/tmp/fsmon_pkg PREFIX=/usr/local PKGDIR="$(pwd)/fsmon.unpkg" -[ -z "${VERSION}" ] && VERSION=1.6 [ -z "${MAKE}" ] && MAKE=make -VERSION=1.6 +. config.mk # VERSION rm -rf "${DESTDIR}" ${MAKE} clean