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