--- examples/Makefile.orig	Fri Nov 18 16:10:03 2005
+++ examples/Makefile	Fri Nov 18 21:32:47 2005
@@ -7,17 +7,17 @@
 # -----------------------------------------------------------------------------------
 
 # Set correct variables and paths
-CC      = g++
-X11PATH = /usr/X11R6
-CFLAGS  = -Wall -ansi -pedantic -ffast-math -I$(X11PATH)/include
-LDFLAGS = -lm -lpthread -lX11 -L$(X11PATH)/lib
+CC      = $(CXX)
+#X11PATH = /usr/X11R6
+#CFLAGS  = -Wall -ansi -pedantic -ffast-math -I$(X11PATH)/include
+#LDFLAGS = -lm -lpthread -lX11 -L$(X11PATH)/lib
 
 # Compilation rules
 .cpp:
 	@echo
 	@echo "** Compiling '$*' with '`$(CC) -v 2>&1 | grep version`'"
 	@echo
-	$(CC) -o $* $< $(CFLAGS) $(LDFLAGS) $(ARCHFLAGS)
+	$(CC) -o $* $< $(CPPFLAGS) -Wall -ansi -pedantic -ffast-math  -I$(X11PATH)/include -lX11 -L$(X11PATH)/lib $(LDFLAGS)
 linux:
 	make all
 solaris:
@@ -42,6 +42,7 @@
 
 clean:
 	rm -f *.exe *~ \
+	Makefile.orig \
         CImg_test \
         fade_images \
         greycstoration \
