Konstantin Demin
c3d09a3e94
imported from https://salsa.debian.org/kernel-team/linux.git commit 9d5cc9d9d6501d7f1dd7e194d4b245bd0b6c6a22 version 6.11.4-1
24 lines
969 B
Makefile
24 lines
969 B
Makefile
PROGS = modpost.real-$(TYPE)
|
|
|
|
include $(top_rulesdir)/Makefile.inc
|
|
|
|
wrapperdir = $(top_rulesdir)/$(OUTDIR)
|
|
CFLAGS += -I $(CURDIR)/real-$(TYPE) -I $(wrapperdir)/real-$(TYPE)
|
|
|
|
modpost.real-$(TYPE): file2alias.real-$(TYPE).o modpost.real-$(TYPE).o sumversion.real-$(TYPE).o symsearch.real-$(TYPE).o
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
|
|
|
|
%.real-$(TYPE).o: $(SOURCEDIR)/%.c real-$(TYPE)/devicetable-offsets.h
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
|
|
|
real-$(TYPE)/devicetable-offsets.s: $(SOURCEDIR)/devicetable-offsets.c
|
|
mkdir -p real-$(TYPE)
|
|
$(CC) -include $(wrapperdir)/real-$(TYPE)/types.h $(CFLAGS) $(CPPFLAGS) -nostdinc -I$(top_srcdir)/include -S -o $@ $<
|
|
|
|
real-$(TYPE)/devicetable-offsets.h: real-$(TYPE)/devicetable-offsets.s
|
|
echo >$@ "#define __DEVICEVTABLE_OFFSETS_H__"
|
|
sed -ne "s:^[[:space:]]*\.ascii[[:space:]]*\"\(.*\)\".*:\1:; \
|
|
/^->/{s:->#\(.*\):/* \1 */:; \
|
|
s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
|
|
s:->::; p;}" $< >>$@
|