Index: trunk/psphot/src/Makefile.am
===================================================================
--- trunk/psphot/src/Makefile.am	(revision 7385)
+++ trunk/psphot/src/Makefile.am	(revision 7438)
@@ -1,12 +1,14 @@
+
 lib_LTLIBRARIES = libpsphot.la
 libpsphot_la_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(psphot_CFLAGS)
-libpsphot_la_LDFLAGS = $(PSMODULE_LIBS) $(PSLIB_LIBS)
-libpsphot_la_SOURCES = $(psphot_SOURCES)
+# libpsphot_la_LDFLAGS = $(PSMODULE_LIBS) $(PSLIB_LIBS)
 
 bin_PROGRAMS = psphot
 psphot_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(psphot_CFLAGS)
 psphot_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS)
+psphot_LDADD = libpsphot.la
 
-PSLIB_DIR = `pslib-config --prefix`
+psphot_SOURCES = \
+	psphot.c		
 
 # psphot_CPPFLAGS = $(libpsphot_la_CPPFLAGS)
@@ -14,6 +16,5 @@
 # psphot_LDADD = libpsphot.la
 
-psphot_SOURCES =		\
-	psphot.c		\
+libpsphot_la_SOURCES = \
 	errorCodes.c		\
 	psphotModelGroupInit.c	\
@@ -48,9 +49,10 @@
 	psphotCleanup.c	   	
 
-noinst_HEADERS =		\
+include_HEADERS = \
 	psphot.h		
 
 clean-local:
 	-rm -f TAGS
+
 # Tags for emacs
 tags:
@@ -63,6 +65,6 @@
 
 psphotErrorCodes.h : errorCodes.dat psphotErrorCodes.h.in
-	$(PSLIB_DIR)/bin/psParseErrorCodes --data=errorCodes.dat --outdir=. \
-						psphotErrorCodes.h
+	$(ERRORCODES) --data=errorCodes.dat --outdir=. psphotErrorCodes.h
+
 errorCodes.c : errorCodes.dat errorCodes.c.in psphotErrorCodes.h
-	$(PSLIB_DIR)/bin/psParseErrorCodes --data=errorCodes.dat --outdir=. errorCodes.c
+	$(ERRORCODES) --data=errorCodes.dat --outdir=. errorCodes.c
