Skip to content

Commit

Permalink
Android build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Edd12321 committed Jul 2, 2023
1 parent b71b9dd commit 7aed88d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
UNAME := $(shell uname -o)

all:
mkdir -p bin
g++ src/main.cpp -o bin/zrc
Expand All @@ -9,7 +11,11 @@ nozledit:
sloc:
sloccount . | tee sloccount.txt
install:
ifeq ($(UNAME), Android)
ln -sf $$(pwd) '/data/data/com.termux/files/zrc'
else
ln -sf $$(pwd) '/usr/lib/zrc'
endif
corebuf:
cd corebuf; \
./build.zrc
Expand Down
6 changes: 5 additions & 1 deletion src/config.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
/* Default lexer token length (optimization) */
#define DEFAULT_TOKSIZ 256
/* Where include searches */
#define LIBPATH "/usr/lib/zrc/stdlib"
#ifdef __ANDROID__
#define LIBPATH "/data/data/com.termux/files/zrc/stdlib"
#else
#define LIBPATH "/usr/lib/zrc/stdlib"
#endif
#define LIBEXT ".zrc"
/* Choose the option to use/not to use line editor */
#ifndef USE_ZLINEEDIT
Expand Down

0 comments on commit 7aed88d

Please sign in to comment.