summaryrefslogtreecommitdiff
path: root/Makefile.musl
blob: d50de248d6ee6578bb46666433a5de6c3d053433 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
ifneq (,$(wildcard /usr/local/musl))
MUSLDIR ?= /usr/local/musl
else ifneq (,$(wildcard /usr/lib/musl))
MUSLDIR ?= /usr/lib/musl
else ifneq (,$(wildcard musl/Makefile))
MUSLDIR ?= musl
lolcat-static: musl
censor-static: musl
else
$(info "musl not found. If the build does not go through, consider either installing")
$(info "musl system-wide using your favorite package manager or fetching and building a")
$(info "local copy using:")
$(info "$ git submodule init")
$(info "$ git submodule update")
$(info "$ make musl")
endif
$(info "Using musl at $(MUSLDIR)")

musl/lib/libc.a musl/lib/crt1.o: musl/config.mak
	make -C musl

musl/config.mak:
	cd musl; ./configure

.PHONY: musl
musl: musl/lib/libc.a musl/lib/crt1.o