RANLIB = ranlib
WINDRES = windres
CFLAGS = -g -std=c99 -D_DEFAULT_SOURCE $(DEBUGFLAGS)
-LDFLAGS = -L`pwd`/Library
+LDFLAGS = -L`pwd`/Library $(MORE_LDFLAGS)
YFLAGS = -d -t -y
LFLAGS =
LIBS =
INSTALLER =
SERVER_MODULE = tcpip.o
RCLI_MODULE = tcpip.o
+MD5SUM = md5sum
VERSION = `cat Library/dataworks.c | grep " dataworks_version " | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?'`
COMPILE_FLAGS = CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" LIB_PREFIX="$(LIB_PREFIX)" LIB_SUFFIX="$(LIB_SUFFIX)" EXEC_SUFFIX="$(EXEC_SUFFIX)" PLATFORM_M="$(PLATFORM_M)" PLATFORM_P="$(PLATFORM_P)" STATICLIB_PREFIX="$(STATICLIB_PREFIX)" STATICLIB_SUFFIX="$(STATICLIB_SUFFIX)" AR="$(AR)" RANLIB="$(RANLIB)" SHCC="$(SHCC)" LINK_LIB="$(LINK_LIB)" AR_ARGS="$(AR_ARGS)" WINDRES="$(WINDRES)" YACC="$(YACC)" LEX="$(LEX)" LFLAGS="$(LFLAGS)" YFLAGS="$(YFLAGS)" SERVER_MODULE="$(SERVER_MODULE)" SERVLINK_LIB="$(SERVLINK_LIB)" RCLI_MODULE="$(RCLI_MODULE)" RCLILINK_LIB="$(RCLILINK_LIB)" INDEP="$(INDEP)" INDEP_TO="$(INDEP_TO)"
cp Client/dataworks workdir-deb/usr/bin/
cp Server/dataworks_server workdir-deb/usr/bin/
cp RemoteClient/dataworks_remote_client workdir-deb/usr/bin/
- cd workdir-deb && find usr -type f | xargs md5sum > DEBIAN/md5sums
+ cd workdir-deb && find usr -type f | xargs $(MD5SUM) > DEBIAN/md5sums
echo "Package: dataworks" > workdir-deb/DEBIAN/control
echo "Version: $(VERSION)" >> workdir-deb/DEBIAN/control
echo "Architecture: $(DEB_ARCH)" >> workdir-deb/DEBIAN/control