Magellan Linux

Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/socketcalls/Kbuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1297 - (show annotations) (download)
Fri May 27 15:12:11 2011 UTC (12 years, 11 months ago) by niro
File size: 1724 byte(s)
-updated to klibc-1.5.22 with mntproc definitions patch included
1 #
2 # Generate socket calls based on SOCKETCALLS.def
3 #
4
5 # Include automatically generated Makefile fragment.
6 # It contains definition of socketcall-objs specifying name of all .o files
7 ifeq ($(clean),)
8 -include $(obj)/socketcalls.mk
9 endif
10
11 # Listing of all .o files
12 always := klib.list
13
14 #####
15 # Generate socket calls stubs
16 # Based on input from SOCKETCALLS.def generate socket call stubs
17 targets := klib.list
18 targets += socketcalls.mk
19 targets += SOCKETCALLS.i
20 targets += $(socketcall-objs)
21 clean-files += *.S *.c *.o *.list
22
23 EXTRA_KLIBCCFLAGS := -I$(srctree)/$(src)
24
25 quiet_cmd_makelist = LIST $@
26 cmd_makelist = echo '$(filter-out FORCE,$^)' > $@
27
28 # Create list of all files
29 $(obj)/klib.list: $(call objectify,$(socketcall-objs)) FORCE
30 $(call if_changed,makelist)
31
32 # Generate assembler file (.i)
33 # We pass -ansi to keep cpp from define e.g. "i386" as well as "__i386__"
34 quiet_cmd_socketcall.i = GEN $@
35 cmd_socketcall.i = $(KLIBCCC) $(klibccflags) -D__ASSEMBLY__ \
36 -ansi -x c -E -o $@ $<
37 $(obj)/SOCKETCALLS.i: $(KLIBCSRC)/SOCKETCALLS.def FORCE
38 $(call if_changed_dep,socketcall.i)
39
40 # Generate socketcall stubs
41 quiet_cmd_socketcalls = GEN $@
42 cmd_socketcalls = $(PERL) $(srctree)/$(KLIBCSRC)/socketcalls.pl \
43 $(obj)/SOCKETCALLS.i \
44 $(KLIBCARCH) $(obj) > $@ \
45 || ( rm -f $@ ; exit 1 )
46
47 $(obj)/socketcalls.mk: $(srctree)/$(KLIBCSRC)/socketcalls.pl \
48 $(obj)/SOCKETCALLS.i \
49 $(src)/socketcommon.h
50 $(call cmd,socketcalls)
51
52 PHONY += FORCE