summaryrefslogtreecommitdiffstats
path: root/debian/rules.d/scripts/mod/Makefile
blob: 6ebade2bc4142de25445864ee174313334aa4ba7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
PROGS = \
	modpost \
	modpost.real-lsb-32 \
	modpost.real-lsb-64 \
	modpost.real-msb-32 \
	modpost.real-msb-64

include $(top_rulesdir)/Makefile.inc

wrapperdir = $(top_rulesdir)/$(OUTDIR)

modpost.real-%:
	$(MAKE) -f $(wrapperdir)/Makefile.real TYPE=$* SOURCEDIR=$(top_srcdir)/scripts/mod

%: %.o
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^

modpost-opts.h: $(top_srcdir)/scripts/mod/modpost.c
	$(wrapperdir)/gendef.py $< > $@

modpost.o: modpost.c modpost-opts.h
	$(CC) $(CFLAGS) $(CPPFLAGS) -I $(CURDIR) -c -o $@ $<