blob: 9f58b1669a46cb2905874ef31ad6fed31716a86a [file] [log] [blame]
#
# Generate socket calls based on SOCKETCALLS.def
#
# Include automatically generated Makefile fragment.
# It contains definition of socketcall-objs specifying name of all .o files
ifeq ($(clean),)
-include $(obj)/socketcalls.mk
endif
# Composite object containing all .o file
always := socketcalls.o
#####
# Generate socket calls stubs
# Based on input from SOCKETCALLS.def generate socket call stubs
targets := socketcalls.o
targets += socketcalls.mk
targets += $(socketcall-objs)
clean-files += *.S *.c *.o
# Create reloctable composite object file
$(obj)/socketcalls.o: $(call objectify,$(socketcall-objs)) FORCE
$(call if_changed,klibcld)
quiet_cmd_socketcalls = GEN $@
cmd_socketcalls = $(PERL) $(KLIBCSRC)/socketcalls.pl \
$(KLIBCSRC)/SOCKETCALLS.def \
$(ARCH) $(obj) > $@ || rm -f $@
# Generate socketcall stubs
$(obj)/socketcalls.mk: $(KLIBCSRC)/socketcalls.pl \
$(KLIBCSRC)/SOCKETCALLS.def \
$(KLIBCSRC)/socketcommon.h
$(call cmd,socketcalls)