summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2016-05-12 00:34:05 -0500
committerBobby Bingham <koorogi@koorogi.info>2016-05-12 00:34:05 -0500
commit63e3a1661f1fa5552e2023683617ce09fac3248b (patch)
tree988a7155a358247e340b27a42ba39adb222ad8b6 /Makefile
parent8ef6170b43e36d4daedc61f0f8177a8cbe18ceda (diff)
downloadmusl-63e3a1661f1fa5552e2023683617ce09fac3248b.tar.gz
musl-63e3a1661f1fa5552e2023683617ce09fac3248b.tar.bz2
musl-63e3a1661f1fa5552e2023683617ce09fac3248b.tar.xz
musl-63e3a1661f1fa5552e2023683617ce09fac3248b.zip
deduplicate __NR_* and SYS_* syscall number definitions
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ec54880d..8246b78f 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@ CRT_OBJS = $(filter obj/crt/%,$(ALL_OBJS))
AOBJS = $(LIBC_OBJS)
LOBJS = $(LIBC_OBJS:.o=.lo)
-GENH = obj/include/bits/alltypes.h
+GENH = obj/include/bits/alltypes.h obj/include/bits/syscall.h
GENH_INT = obj/src/internal/version.h
IMPH = $(addprefix $(srcdir)/, src/internal/stdio_impl.h src/internal/pthread_impl.h src/internal/libc.h)
@@ -96,6 +96,10 @@ $(OBJ_DIRS):
obj/include/bits/alltypes.h: $(srcdir)/arch/$(ARCH)/bits/alltypes.h.in $(srcdir)/include/alltypes.h.in $(srcdir)/tools/mkalltypes.sed
sed -f $(srcdir)/tools/mkalltypes.sed $(srcdir)/arch/$(ARCH)/bits/alltypes.h.in $(srcdir)/include/alltypes.h.in > $@
+obj/include/bits/syscall.h: $(srcdir)/arch/$(ARCH)/bits/syscall.h.in
+ cp $< $@
+ sed -n -e s/__NR_/SYS_/p < $< >> $@
+
obj/src/internal/version.h: $(wildcard $(srcdir)/VERSION $(srcdir)/.git)
printf '#define VERSION "%s"\n' "$$(cd $(srcdir); sh tools/version.sh)" > $@