kuroko: add managed modules to filesystem
This commit is contained in:
parent
f0de4abfb8
commit
5cdec2a98f
1
.gitignore
vendored
1
.gitignore
vendored
@ -25,6 +25,7 @@
|
||||
/base/bin/*
|
||||
/base/usr/bin/*
|
||||
/base/usr/lib/*
|
||||
/base/lib/kuroko/*
|
||||
/.make/
|
||||
/cdrom
|
||||
/fatbase
|
||||
|
5
Makefile
5
Makefile
@ -67,6 +67,7 @@ LIBS_X=$(foreach lib,$(LIBS),$(BASE)/lib/libtoaru_$(lib).so)
|
||||
LIBS_Y=$(foreach lib,$(LIBS),.make/$(lib).lmak)
|
||||
|
||||
KRK_MODS = $(patsubst kuroko/src/modules/module_%.c,$(BASE)/lib/kuroko/%.so,$(wildcard kuroko/src/modules/module_*.c))
|
||||
KRK_MODS = $(patsubst kuroko/modules/%,$(BASE)/lib/kuroko/%,$(wildcard kuroko/modules/*.krk kuroko/modules/*/*/.krk kuroko/modules/*/*/*.krk))
|
||||
KRK_MODS_X = $(patsubst lib/kuroko/%.c,$(BASE)/lib/kuroko/%.so,$(wildcard lib/kuroko/*.c))
|
||||
KRK_MODS_Y = $(patsubst lib/kuroko/%.c,.make/%.kmak,$(wildcard lib/kuroko/*.c))
|
||||
|
||||
@ -101,6 +102,10 @@ $(BASE)/bin/kuroko: $(KRK_SRC) $(CRTS) lib/rline.c | $(LC)
|
||||
$(BASE)/lib/kuroko/%.so: kuroko/src/modules/module_%.c| dirs $(LC)
|
||||
$(CC) -O2 -shared -fPIC -Ikuroko/src -o $@ $<
|
||||
|
||||
$(BASE)/lib/kuroko/%.krk: kuroko/modules/%.krk | dirs
|
||||
mkdir -p $(dir $@)
|
||||
cp $< $@
|
||||
|
||||
$(BASE)/lib/libkuroko.so: $(KRK_SRC) | $(LC)
|
||||
$(CC) -O2 -shared -fPIC -Ikuroko/src -o $@ $(filter-out kuroko/src/kuroko.c,$(KRK_SRC))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user