summaryrefslogtreecommitdiff
path: root/klibc/Makefile
blob: 8823a33bfd94e51b0f6e2edb3ae62e79a283a29e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
VERSION := $(shell cat version)
SUBDIRS = klibc

all:

rpmbuild = $(shell which rpmbuild 2>/dev/null || which rpm)

klibc.spec: klibc.spec.in version
	sed -e 's/@@VERSION@@/$(VERSION)/g' < $< > $@

.PHONY: rpm
rpm: klibc.spec
	+$(rpmbuild) -bb klibc.spec --target=$(ARCH)

%:
	@set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done

clean:
	@set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done

spotless:
	@set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
	rm -f klibc.spec *~ tags