Makefile (1159B)
1 # See LICENSE file for copyright and license details. 2 3 VERSION = pre-3.0 4 5 PREFIX = /usr/local 6 7 CPPFLAGS = -DVERSION=\"${VERSION}\" 8 CFLAGS = -std=c99 -pedantic -Wall -Wextra \ 9 -Wno-unused-parameter -Wno-unused-function \ 10 -O3 ${CPPFLAGS} 11 DBFLAGS = -std=c99 -pedantic -Wall -Wextra \ 12 -Wno-unused-parameter -Wno-unused-function \ 13 -fsanitize=address -fsanitize=undefined \ 14 -g3 ${CPPFLAGS} 15 16 CC = clang 17 18 all: nissy 19 20 clean: 21 rm -rf nissy nissy_flutter nissy_flutter_ffi 22 23 nissy_flutter: 24 flutter create nissy_flutter 25 cp -R flutter/* nissy_flutter/ 26 27 nissy_flutter_ffi: tables 28 flutter create --template=plugin_ffi \ 29 --platforms=linux,android,windows,macos,ios nissy_flutter_ffi 30 rm -rf nissy_flutter_ffi/src 31 cp -R flutter_ffi/* nissy_flutter_ffi/ 32 cp src/* nissy_flutter_ffi/src/ 33 cd nissy_flutter_ffi && \ 34 flutter pub run ffigen --config ffigen.yaml 35 cp tables nissy_flutter/data/ 36 37 nissy: clean nissy_flutter nissy_flutter_ffi 38 39 debug: 40 ${CC} ${DBFLAGS} -o nissy cli/*.c src/*.c 41 42 cleantables: 43 rm -rf tables 44 45 tables: 46 ${CC} ${DBFLAGS} -o buildtables build/*.c src/*.c 47 ./buildtables 48 rm buildtables 49 50 .PHONY: all clean cleantables debug