• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..01-Sep-2021-

README.mdH A D01-Sep-2021884 2920

import.cH A D01-Sep-2021333 1813

lexermemzip.cH A D01-Sep-2021410 2014

make-memzip.pyH A D01-Sep-20212.5 KiB8062

memzip.cH A D01-Sep-20213.1 KiB10786

memzip.hH A D01-Sep-20212.2 KiB8462

README.md

1MEMZIP - a simple readonly file system
2
3memzip takes a zip file which is comprised of uncompressed files and
4and presents it as a filesystem, allowing Python files to be imported.
5
6The script make-memzip.py takes a directory name and will create a zip file
7containing uncompressed files found in the directory. It will then generate
8a C file which contains the data from the zip file.
9
10A typical addition to a makefile would look like:
11```
12SRC_C += \
13    shared/memzip/import.c \
14    shared/memzip/lexermemzip.c \
15    shared/memzip/memzip.c \
16
17OBJ += $(BUILD)/memzip-files.o
18
19MAKE_MEMZIP = ../shared/memzip/make-memzip.py
20
21$(BUILD)/memzip-files.o: $(BUILD)/memzip-files.c
22    $(call compile_c)
23
24$(BUILD)/memzip-files.c: $(shell find ${MEMZIP_DIR} -type f)
25    @$(ECHO) "Creating $@"
26    $(Q)$(PYTHON) $(MAKE_MEMZIP) --zip-file $(BUILD)/memzip-files.zip --c-file $@ $(MEMZIP_DIR)
27```
28
29