Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (hide annotations) (download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File size: 1650 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd

1 niro 532 #
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) $(KLIBCSRC)/socketcalls.pl \
43     $(obj)/SOCKETCALLS.i \
44     $(KLIBCARCH) $(obj) > $@ \
45     || ( rm -f $@ ; exit 1 )
46    
47     $(obj)/socketcalls.mk: $(KLIBCSRC)/socketcalls.pl \
48     $(obj)/SOCKETCALLS.i \
49     $(src)/socketcommon.h
50     $(call cmd,socketcalls)