diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 index 5d63dee..7d18695 100644 --- a/Dockerfile.arm32v7 +++ b/Dockerfile.arm32v7 @@ -6,8 +6,8 @@ RUN git clone https://github.com/crystal-lang/crystal && cd crystal && git check RUN git clone https://github.com/kostya/myhtml && cd myhtml/src/ext && make && cd .. RUN git clone https://github.com/jessedoyle/duktape.cr && cd duktape.cr/ext && make && cd .. -COPY mango.o . +COPY mango.arm32v7.o . -RUN cc 'mango.o' -o 'mango' -rdynamic -lxml2 /myhtml/src/ext/modest-c/lib/libmodest_static.a -L/duktape.cr/src/.build/lib -L/duktape.cr/src/.build/include -lduktape -lm `pkg-config libarchive --libs` -lz `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libssl || printf %s '-lssl -lcrypto'` `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libcrypto || printf %s '-lcrypto'` -lgmp -lsqlite3 -lyaml -lpcre -lm /usr/lib/arm-linux-gnueabihf/libgc.so -lpthread /crystal/src/ext/libcrystal.a -levent -lrt -ldl -L/usr/bin/../lib/crystal/lib -L/usr/bin/../lib/crystal/lib +RUN cc 'mango.arm32v7.o' -o 'mango' -rdynamic -lxml2 /myhtml/src/ext/modest-c/lib/libmodest_static.a -L/duktape.cr/src/.build/lib -L/duktape.cr/src/.build/include -lduktape -lm `pkg-config libarchive --libs` -lz `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libssl || printf %s '-lssl -lcrypto'` `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libcrypto || printf %s '-lcrypto'` -lgmp -lsqlite3 -lyaml -lpcre -lm /usr/lib/arm-linux-gnueabihf/libgc.so -lpthread /crystal/src/ext/libcrystal.a -levent -lrt -ldl -L/usr/bin/../lib/crystal/lib -L/usr/bin/../lib/crystal/lib CMD ["./mango"] diff --git a/Makefile b/Makefile index 4a76493..4b4baa7 100644 --- a/Makefile +++ b/Makefile @@ -3,9 +3,6 @@ INSTALL_DIR=$(PREFIX)/bin all: uglify | build -arm32v7: uglify | libs - crystal build src/mango.cr --release --progress --cross-compile --target='arm-linux-gnueabihf' - uglify: yarn yarn uglify @@ -34,6 +31,10 @@ check: ./bin/ameba ./dev/linewidth.sh +arm32v7: + crystal build src/mango.cr --release --progress --cross-compile --target='arm-linux-gnueabihf' + mv mango.o mango.arm32v7.o + install: cp mango $(INSTALL_DIR)/mango