2015-11-01 00:24:47 -04:00
|
|
|
MEMZIP - a simple readonly file system
|
|
|
|
|
|
|
|
memzip takes a zip file which is comprised of uncompressed files and
|
|
|
|
and presents it as a filesystem, allowing Python files to be imported.
|
|
|
|
|
|
|
|
The script make-memzip.py takes a directory name and will create a zip file
|
|
|
|
containing uncompressed files found in the directory. It will then generate
|
|
|
|
a C file which contains the data from the zip file.
|
|
|
|
|
|
|
|
A typical addition to a makefile would look like:
|
|
|
|
```
|
|
|
|
SRC_C += \
|
2021-07-09 00:19:15 -04:00
|
|
|
shared/memzip/import.c \
|
|
|
|
shared/memzip/lexermemzip.c \
|
|
|
|
shared/memzip/memzip.c \
|
2015-11-01 00:24:47 -04:00
|
|
|
|
|
|
|
OBJ += $(BUILD)/memzip-files.o
|
|
|
|
|
2021-07-09 00:19:15 -04:00
|
|
|
MAKE_MEMZIP = ../shared/memzip/make-memzip.py
|
2015-11-01 00:24:47 -04:00
|
|
|
|
|
|
|
$(BUILD)/memzip-files.o: $(BUILD)/memzip-files.c
|
|
|
|
$(call compile_c)
|
|
|
|
|
|
|
|
$(BUILD)/memzip-files.c: $(shell find ${MEMZIP_DIR} -type f)
|
|
|
|
@$(ECHO) "Creating $@"
|
|
|
|
$(Q)$(PYTHON) $(MAKE_MEMZIP) --zip-file $(BUILD)/memzip-files.zip --c-file $@ $(MEMZIP_DIR)
|
|
|
|
```
|
|
|
|
|