Build brother120tool and cwftoflux.

This commit is contained in:
David Given
2019-07-08 22:44:38 +02:00
parent adb1e9ba00
commit 3960b1e4d7
3 changed files with 28 additions and 9 deletions

View File

@@ -15,7 +15,7 @@ install:
build_script:
- make
- zip -9 fluxengine.zip fluxengine.exe
- zip -9 fluxengine.zip fluxengine.exe brother120tool.exe cwftoflux.exe
artifacts:
- path: fluxengine.zip

View File

@@ -1,19 +1,23 @@
PACKAGES = zlib sqlite3 libusb-1.0
export CFLAGS = -O3 -g --std=c++14 \
-ffunction-sections -fdata-sections
export LDFLAGS = -O3
ifeq ($(OS), Windows_NT)
export CXX = /mingw32/bin/g++
export AR = /mingw32/bin/ar rcs
export STRIP = /mingw32/bin/strip
export CFLAGS = -O3 -g --std=c++14 -I/mingw32/include/libusb-1.0
export LDFLAGS = -O3
export CFLAGS += -I/mingw32/include/libusb-1.0
export LDFLAGS +=
export LIBS = -static -lz -lsqlite3 -lusb-1.0
export EXTENSION = .exe
else
export CXX = g++
export AR = ar rcs
export STRIP = strip
export CFLAGS = -Og -g --std=c++14 $(shell pkg-config --cflags $(PACKAGES))
export LDFLAGS = -Og
export CFLAGS += $(shell pkg-config --cflags $(PACKAGES))
export LDFLAGS +=
export LIBS = $(shell pkg-config --libs $(PACKAGES))
export EXTENSION =
endif

View File

@@ -83,8 +83,10 @@ buildprogram() {
objs="$objs $OBJDIR/$src"
done
echo build $prog : link $objs
echo build $prog-debug$EXTENSION : link $objs
echo " flags=$flags"
echo build $prog$EXTENSION : strip $prog-debug$EXTENSION
}
runtest() {
@@ -100,7 +102,7 @@ runtest() {
libbackend.a \
libfmt.a
echo build $OBJDIR/$prog.stamp : test $OBJDIR/$prog$EXTENSION
echo build $OBJDIR/$prog.stamp : test $OBJDIR/$prog-debug$EXTENSION
}
buildlibrary libfmt.a \
@@ -176,12 +178,25 @@ buildlibrary libfrontend.a \
src/fe-writetestpattern.cc \
src/fluxengine.cc \
buildprogram fluxengine-debug$EXTENSION \
buildprogram fluxengine \
libfrontend.a \
libbackend.a \
libfmt.a \
echo "build fluxengine$EXTENSION : strip fluxengine-debug$EXTENSION"
buildlibrary libbrother120tool.a \
tools/brother120tool.cc \
buildprogram brother120tool \
libbrother120tool.a \
libfmt.a \
buildlibrary libcwftoflux.a \
tools/cwftoflux.cc \
buildprogram cwftoflux \
libcwftoflux.a \
libbackend.a \
libfmt.a \
runtest dataspec-test tests/dataspec.cc
runtest flags-test tests/flags.cc