libk  Diff

Differences From Artifact [216e76c37d]:

To Artifact [6234448ba2]:


6
7
8
9
10
11
12



13
14
15
16
17
18
19
..
28
29
30
31
32
33
34










35
36
37
38
39
40
41
export TMP = $(PWD)/tmp

export TARGET = $(ARCH).$(OS).$(BITS)

moddirs = $(wildcard k*)
binaries = $(wildcard */exe.*.c)
binmods = $(sort $(dir $(binaries)))




posix-oses = lin fbsd dar and hai mgw

ifeq ($(findstring $(OS),$(posix-oses)),$(OS))
export POSIX = yes
else
export POSIX = no
................................................................................
lib.static: defs obj $(OUT)/libk.a
lib.shared: defs obj $(OUT)/libk.so
obj: $(moddirs:%=%.obj)
defs: $(moddirs:%=%.def)
tool: $(OUT)/libk.a $(binmods:%=%.tool) 
clean:
	rm -rf $(TMP) $(OUT)











lists = moddirs objects binaries binmods POSIX
dbg:
	@echo -e lists: $(foreach var, $(lists), "\\n - \\e[1m$(var)\\e[m = $($(var))")

%.obj: %/makefile ${TARGET}.calls $(OUT)
	cd $* && $(MAKE) obj







>
>
>







 







>
>
>
>
>
>
>
>
>
>







6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
export TMP = $(PWD)/tmp

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
else
export POSIX = no
................................................................................
lib.static: defs obj $(OUT)/libk.a
lib.shared: defs obj $(OUT)/libk.so
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))")

%.obj: %/makefile ${TARGET}.calls $(OUT)
	cd $* && $(MAKE) obj