Index: trunk/Ohana/Makefile.Common
===================================================================
--- trunk/Ohana/Makefile.Common	(revision 11750)
+++ trunk/Ohana/Makefile.Common	(revision 11888)
@@ -1,8 +1,12 @@
 # this file must be added to the makefile *after* LIB,BIN, etc are defined
 
-# XXX replace BINDIR, etc with DESTBIN in Configure.in
+# (INC)     & (LIB)     are the program's local include & lib directories
+# (DESTINC) & (DESTLIB) are the target installation include & lib directories
+# (INCDIRS) & (LIBDIRS) are all of the probed include & lib directories
+# (LIBFLAGS) is the list of -lXXX directives from configure for external libs
 
-CFLAGS	=	-I$(INC) -I$(DESTINC) $(INCDIRS) -D$(ARCH)
-LDFLAGS = 	-L$(LIB) -L$(DESTLIB) $(LIBDIRS) $(LIBFLAGS)
+BASE_CFLAGS   =	$(CFLAGS)
+BASE_CPPFLAGS =	$(CPPFLAGS) -I$(INC) -I$(DESTINC) $(INCDIRS) -D$(ARCH)
+BASE_LDFLAGS  = $(LDFLAGS) -L$(LIB) -L$(DESTLIB) $(LIBDIRS) $(LIBFLAGS)
 
 .PRECIOUS: %.$(ARCH).o
@@ -18,10 +22,9 @@
 
 %.$(ARCH).o : %.c
-	$(CC) $(CFLAGS) -c $< -o $@
+	$(CC) $(FULL_CFLAGS) $(FULL_CPPFLAGS) -c $< -o $@
 
 $(BIN)/%.$(ARCH):
-	@echo "trying $*"
 	@if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
-	$(CC) -o $@ $^ $(LDFLAGS)
+	$(CC) $(FULL_CFLAGS) -o $@ $^ $(FULL_LDFLAGS)
 	@echo "compiled $*"
 	@echo ""
