--- openafs-1.6.5.orig/src/rxgen/Makefile.in	2013-07-18 00:10:42.000000000 +0200
+++ openafs-1.6.5/src/rxgen/Makefile.in	2013-09-10 20:57:38.854784594 +0200
@@ -25,10 +25,14 @@ ${TOP_INCDIR}/afs/rxgen_consts.h: rxgen_
 	${INSTALL_DATA} $? $@
 
 rxgen: $(OBJS) AFS_component_version_number.c $(HDRS)
-	$(CC) $(CFLAGS) $(OBJS) $(XLIBS) -o $@
+	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(OBJS) $(XLIBS) -o $@
 
 rpc_main.o: rpc_main.c
-	$(CCOBJ) $(CFLAGS) -c ${srcdir}/rpc_main.c -DPATH_CPP="\"$(PATH_CPP)\""
+	$(CC_FOR_BUILD) ${COMMON_INCL} $(CFLAGS_FOR_BUILD) -c ${srcdir}/rpc_main.c -DPATH_CPP="\"$(PATH_CPP)\""
+
+.c.o:
+	$(CC_FOR_BUILD) ${COMMON_INCL} $(CFLAGS_FOR_BUILD) -c $<
+
 
 #
 # Install targets
