Complete sources for a monero webminer.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
656 B

2 years ago
  1. TARGET = prog
  2. LIBS = -lm
  3. CC = emcc -O3 -s NO_FILESYSTEM=1 -s 'EXTRA_EXPORTED_RUNTIME_METHODS=["ccall", "cwrap"]' --llvm-lto 1 -s TOTAL_MEMORY=67108864 -s WASM=1 -s "BINARYEN_TRAP_MODE='allow'" -s EXPORTED_FUNCTIONS="['_hash_cn']" --shell-file html_template/shell_minimal.html
  4. CFLAGS = -Wall
  5. # -s ASSERTIONS=1
  6. # -s SINGLE_FILE=1
  7. .PHONY: default all clean
  8. default: $(TARGET)
  9. all: default
  10. OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c))
  11. HEADERS = $(wildcard *.h)
  12. %.o: %.c $(HEADERS) $(CC) $(CFLAGS) -c $< -o $@
  13. .PRECIOUS: $(TARGET) $(OBJECTS)
  14. $(TARGET): $(OBJECTS)
  15. $(CC) $(OBJECTS) -Wall $(LIBS) -o cn.html
  16. clean:
  17. -rm -f *.o
  18. -rm -f $(TARGET)