This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / fs / hostfs / Makefile
1
2 # Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
3 # Licensed under the GPL
4 #
5
6 # struct stat64 changed the inode field name between 2.2 and 2.4 from st_ino
7 # to __st_ino.  It stayed in the same place, so as long as the correct name
8 # is used, hostfs compiled on 2.2 should work on 2.4 and vice versa.
9
10 STAT64_INO_FIELD := $(shell grep -q __st_ino /usr/include/bits/stat.h && \
11                                 echo __)st_ino
12
13 hostfs-objs := hostfs_kern.o hostfs_user.o
14
15 obj-y = 
16 obj-$(CONFIG_HOSTFS) += hostfs.o
17
18 SINGLE_OBJS = $(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs))
19
20 USER_OBJS := $(filter %_user.o,$(obj-y) $(obj-m) $(SINGLE_OBJS))
21 USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
22
23 USER_CFLAGS += -DSTAT64_INO_FIELD=$(STAT64_INO_FIELD)
24
25 $(USER_OBJS) : %.o: %.c
26         $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $<