libk  Check-in [2ed2a90fe5]

Overview
Comment:add {,un}install rule
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 2ed2a90fe516f32b056ee5ae044ac8c0a4a964ed47c2feb108607883dd1ceeb8
User & Date: lexi on 2019-06-28 01:59:19
Other Links: manifest | tags
Context
2019-06-28
04:32
restructure file naming conventions and conclusively fix longstanding architectural build system problems with loads and loads of variables and a shit ton of function calls check-in: d27f92e3b7 user: lexi tags: trunk
01:59
add {,un}install rule check-in: 2ed2a90fe5 user: lexi tags: trunk
2019-06-27
22:14
fixes for shared building check-in: ec9b2b74b3 user: lexi tags: trunk
Changes

Modified makefile from [216e76c37d] to [6234448ba2].

     6      6   export TMP = $(PWD)/tmp
     7      7   
     8      8   export TARGET = $(ARCH).$(OS).$(BITS)
     9      9   
    10     10   moddirs = $(wildcard k*)
    11     11   binaries = $(wildcard */exe.*.c)
    12     12   binmods = $(sort $(dir $(binaries)))
           13  +
           14  +header-dir = /usr/include
           15  +lib-dir = /usr/lib
    13     16   
    14     17   posix-oses = lin fbsd dar and hai mgw
    15     18   
    16     19   ifeq ($(findstring $(OS),$(posix-oses)),$(OS))
    17     20   export POSIX = yes
    18     21   else
    19     22   export POSIX = no
................................................................................
    28     31   lib.static: defs obj $(OUT)/libk.a
    29     32   lib.shared: defs obj $(OUT)/libk.so
    30     33   obj: $(moddirs:%=%.obj)
    31     34   defs: $(moddirs:%=%.def)
    32     35   tool: $(OUT)/libk.a $(binmods:%=%.tool) 
    33     36   clean:
    34     37   	rm -rf $(TMP) $(OUT)
           38  +
           39  +install: all
           40  +	install -d $(header-dir)/k -o root -g wheel
           41  +	install $(OUT)/k/* $(header-dir)/k/ -o root -g wheel -m 0644
           42  +	install -d $(lib-dir)/k -o root -g wheel
           43  +	install $(OUT)/libk.a $(OUT)/libk.so $(OUT)/boot.o \
           44  +		$(lib-dir)/k/ -o root -g wheel -m 0644
           45  +
           46  +uninstall: $(header-dir)/k $(lib-dir)/k
           47  +	rm -rf $^
    35     48   
    36     49   lists = moddirs objects binaries binmods POSIX
    37     50   dbg:
    38     51   	@echo -e lists: $(foreach var, $(lists), "\\n - \\e[1m$(var)\\e[m = $($(var))")
    39     52   
    40     53   %.obj: %/makefile ${TARGET}.calls $(OUT)
    41     54   	cd $* && $(MAKE) obj