123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- ifdef OS
- MSVC_CHECK = cl /?
- PLATFORM_MAKE = cmd <<< "vcvars64.bat && nmake && exit || exit 1"
- LIB_PROJECT = qtbinding_windows.pro
- LIB_BIN = standalone/qt/build/release/qtbinding.dll
- EXENAME = kumachan.exe
- else
- MSVC_CHECK = $(NOOP)
- PLATFORM_MAKE = $(MAKE)
- LIB_PROJECT = qtbinding.pro
- LIB_BIN = standalone/qt/build/libqtbinding*
- EXENAME = kumachan
- endif
- default: all
- check:
- @echo -e '\033[1mChecking for Qt...\033[0m'
- qmake -v
- $(MSVC_CHECK)
- @echo -e '\033[1mChecking for Go...\033[0m'
- go version
- qt:
- @echo -e '\033[1mCompiling CGO Qt Binding...\033[0m'
- cd standalone/qt/build && qmake ../qtbinding/$(LIB_PROJECT) && $(PLATFORM_MAKE)
- cp -P $(LIB_BIN) build/
- stdlib:
- @echo -e '\033[1mCopying Standard Library Files...\033[0m'
- if [ -d build/stdlib ]; then rm -r build/stdlib; fi
- cp -rP stdlib build/
- rm build/stdlib/*.go
- deps: check qt stdlib
- $(NOOP)
- interpreter: deps
- @echo -e '\033[1mCompiling the Interpreter...\033[0m'
- go build -o ./build/$(EXENAME) main.go
- .PHONY: check qt stdlib resources deps interpreter
- all: interpreter
|