xref: /linux/tools/build/tests/ex/Makefile (revision da1d9caf95def6f0320819cf941c9fd1069ba9e1)
1# SPDX-License-Identifier: GPL-2.0
2export srctree := $(abspath ../../../..)
3export CC      := gcc
4export LD      := ld
5export AR      := ar
6
7ex:
8
9include $(srctree)/tools/build/Makefile.include
10
11ex: ex-in.o libex-in.o
12	$(CC) -o $@ $^
13
14ex.%: fixdep FORCE
15	make -f $(srctree)/tools/build/Makefile.build dir=. $@
16
17ex-in.o: fixdep FORCE
18	make $(build)=ex
19
20libex-in.o: fixdep FORCE
21	make $(build)=libex
22
23clean:
24	find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
25	rm -f ex ex.i ex.s
26
27.PHONY: FORCE
28