Index: makefile ================================================================== --- makefile +++ makefile @@ -8,10 +8,13 @@ export TARGET = $(ARCH).$(OS).$(BITS) moddirs = $(wildcard k*) binaries = $(wildcard */exe.*.c) binmods = $(sort $(dir $(binaries))) + +header-dir = /usr/include +lib-dir = /usr/lib posix-oses = lin fbsd dar and hai mgw ifeq ($(findstring $(OS),$(posix-oses)),$(OS)) export POSIX = yes @@ -30,10 +33,20 @@ obj: $(moddirs:%=%.obj) defs: $(moddirs:%=%.def) tool: $(OUT)/libk.a $(binmods:%=%.tool) clean: rm -rf $(TMP) $(OUT) + +install: all + install -d $(header-dir)/k -o root -g wheel + install $(OUT)/k/* $(header-dir)/k/ -o root -g wheel -m 0644 + install -d $(lib-dir)/k -o root -g wheel + install $(OUT)/libk.a $(OUT)/libk.so $(OUT)/boot.o \ + $(lib-dir)/k/ -o root -g wheel -m 0644 + +uninstall: $(header-dir)/k $(lib-dir)/k + rm -rf $^ lists = moddirs objects binaries binmods POSIX dbg: @echo -e lists: $(foreach var, $(lists), "\\n - \\e[1m$(var)\\e[m = $($(var))")