Index: trunk/SophyaExt/IFFTW/Makefile
===================================================================
--- trunk/SophyaExt/IFFTW/Makefile	(revision 2742)
+++ trunk/SophyaExt/IFFTW/Makefile	(revision 2743)
@@ -1,30 +1,35 @@
-include ../Mgr/Makefile.h
+include ../BuildMgr/sophyamake.inc
  
-all: $(LIB)libIFFTW.a
+all: $(SOPHYALIBP)libIFFTW.a
+ 
 clean:
-	rm -f $(OBJ)fftwserver.o
-	rm -f $(LIB)libIFFTW.a
-$(LIB)libIFFTW.a : $(OBJ)fftwserver.o
-	$(ARCXX) $(ARCXXFLAGS) $@ $($(ARARGS))
-ifeq ($(CXX),cxx)
-	$(CXX) $? $(CPPFLAGS) $(CXXFLAGS) -o $(OBJ)xx.x -Hf
-endif 
+	 rm -f $(SOPHYAOBJP)fftwserver.o
+	rm -f $(SOPHYALIBP)libIFFTW.a
  
-$(OBJ)fftwserver.o: fftwserver.cc fftwserver.h \
- $(INC)machdefs.h \
- $(INC)fftservintf.h \
- $(INC)pexceptions.h \
- $(INC)tmatrix.h \
- $(INC)tarray.h \
- $(INC)basarr.h \
- $(INC)anydataobj.h \
- $(INC)mutyv.h \
- $(INC)dvlist.h \
- $(INC)objfio.h \
- $(INC)ppersist.h \
- $(INC)gnumd5.h \
- $(INC)ndatablock.h \
- $(INC)utilarr.h \
- $(INC)tvector.h \
- $(EXTINCPATH)FFTW/fftw.h \
- $(EXTINCPATH)FFTW/rfftw.h
+$(SOPHYALIBP)libIFFTW.a : $(SOPHYAOBJP)fftwserver.o
+	$(AR) $(ARFLAGS) $@ $? 
+ 
+$(SOPHYAOBJP)fftwserver.o: fftwserver.cc \
+  $(SOPHYAINCP)sopnamsp.h fftwserver.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)fftservintf.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)utilarr.h \
+  $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)FFTW/fftw.h \
+  $(SOPHYAINCP)FFTW/rfftw.h
+	$(CXXCOMPILE) -o $@ $<
+ 
Index: trunk/SophyaExt/IFFTW/smakefile
===================================================================
--- trunk/SophyaExt/IFFTW/smakefile	(revision 2743)
+++ trunk/SophyaExt/IFFTW/smakefile	(revision 2743)
@@ -0,0 +1,35 @@
+include $(SOPHYABASE)/include/sophyamake.inc
+ 
+all: $(SOPHYALIBP)libIFFTW.a
+ 
+clean:
+	 rm -f $(SOPHYAOBJP)fftwserver.o
+	rm -f $(SOPHYALIBP)libIFFTW.a
+ 
+$(SOPHYALIBP)libIFFTW.a : $(SOPHYAOBJP)fftwserver.o
+	$(AR) $(ARFLAGS) $@ $? 
+ 
+$(SOPHYAOBJP)fftwserver.o: fftwserver.cc \
+  $(SOPHYAINCP)sopnamsp.h fftwserver.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)fftservintf.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)utilarr.h \
+  $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)FFTW/fftw.h \
+  $(SOPHYAINCP)FFTW/rfftw.h
+	$(CXXCOMPILE) -o $@ $<
+ 
Index: trunk/SophyaExt/LinAlg/Makefile
===================================================================
--- trunk/SophyaExt/LinAlg/Makefile	(revision 2742)
+++ trunk/SophyaExt/LinAlg/Makefile	(revision 2743)
@@ -1,27 +1,32 @@
-include ../Mgr/Makefile.h
+include ../BuildMgr/sophyamake.inc
  
-all: $(LIB)libLinAlg.a
+all: $(SOPHYALIBP)libLinAlg.a
+ 
 clean:
-	rm -f $(OBJ)intflapack.o
-	rm -f $(LIB)libLinAlg.a
-$(LIB)libLinAlg.a : $(OBJ)intflapack.o
-	$(ARCXX) $(ARCXXFLAGS) $@ $($(ARARGS))
-ifeq ($(CXX),cxx)
-	$(CXX) $? $(CPPFLAGS) $(CXXFLAGS) -o $(OBJ)xx.x -Hf
-endif 
+	 rm -f $(SOPHYAOBJP)intflapack.o
+	rm -f $(SOPHYALIBP)libLinAlg.a
  
-$(OBJ)intflapack.o: intflapack.cc intflapack.h \
- $(INC)machdefs.h \
- $(INC)tarray.h \
- $(INC)basarr.h \
- $(INC)anydataobj.h \
- $(INC)mutyv.h \
- $(INC)dvlist.h \
- $(INC)objfio.h \
- $(INC)ppersist.h \
- $(INC)pexceptions.h \
- $(INC)gnumd5.h \
- $(INC)ndatablock.h \
- $(INC)utilarr.h \
- $(INC)tvector.h \
- $(INC)tmatrix.h
+$(SOPHYALIBP)libLinAlg.a : $(SOPHYAOBJP)intflapack.o
+	$(AR) $(ARFLAGS) $@ $? 
+ 
+$(SOPHYAOBJP)intflapack.o: intflapack.cc \
+  $(SOPHYAINCP)sopnamsp.h intflapack.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)utilarr.h \
+  $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)tmatrix.h
+	$(CXXCOMPILE) -o $@ $<
+ 
Index: trunk/SophyaExt/LinAlg/smakefile
===================================================================
--- trunk/SophyaExt/LinAlg/smakefile	(revision 2743)
+++ trunk/SophyaExt/LinAlg/smakefile	(revision 2743)
@@ -0,0 +1,32 @@
+include $(SOPHYABASE)/include/sophyamake.inc
+ 
+all: $(SOPHYALIBP)libLinAlg.a
+ 
+clean:
+	 rm -f $(SOPHYAOBJP)intflapack.o
+	rm -f $(SOPHYALIBP)libLinAlg.a
+ 
+$(SOPHYALIBP)libLinAlg.a : $(SOPHYAOBJP)intflapack.o
+	$(AR) $(ARFLAGS) $@ $? 
+ 
+$(SOPHYAOBJP)intflapack.o: intflapack.cc \
+  $(SOPHYAINCP)sopnamsp.h intflapack.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)utilarr.h \
+  $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)tmatrix.h
+	$(CXXCOMPILE) -o $@ $<
+ 
Index: trunk/SophyaExt/MinuitAdapt/Makefile
===================================================================
--- trunk/SophyaExt/MinuitAdapt/Makefile	(revision 2742)
+++ trunk/SophyaExt/MinuitAdapt/Makefile	(revision 2743)
@@ -1,48 +1,27 @@
-MODULECXXREPNAME :=  MinuitAdapt
-MODULEDECCXXFLAGS := -msg_quiet
-include ../Mgr/Makefile.h
+include ../BuildMgr/sophyamake.inc
 
-CFLAGS   := $(CFLAGS) -Df2cFortran
 CPPFLAGS := $(CPPFLAGS) -Df2cFortran
 CXXFLAGS := $(CXXFLAGS) -Df2cFortran
  
-all: $(LIB)libMinuitAdapt.a
+all: $(SOPHYALIBP)libMinuitAdapt.a
 
-clean: cleantest
-	rm -f $(OBJ)minuitadapt.o $(OBJ)minuitadaptF.o
-	rm -f $(LIB)libMinuitAdapt.a
-
-cleantest:
+clean:
+	rm -f $(SOPHYAOBJP)minuitadapt.o $(SOPHYAOBJP)minuitadaptF.o
+	rm -f $(SOPHYALIBP)libMinuitAdapt.a
 	rm -f testminuit testminuit.o
-
-# Doit etre fait automatiquement par mkmflien
-install:
-	cp localmnpout.h minuitprot.h minuitadapt.h $(INC)/.
-
-#----------------------------------------------------------------------
-$(LIB)libMinuitAdapt.a : $(OBJ)minuitadapt.o $(OBJ)minuitadaptF.o
-	$(ARCXX) $(ARCXXFLAGS) $@ $($(ARARGS))
-ifeq ($(CXX),cxx)
-	$(CXX) $? $(CPPFLAGS) $(CXXFLAGS) -o $(OBJ)xx.x -Hf
-endif 
- 
-$(OBJ)minuitadaptF.o: minuitadaptF.f
-$(OBJ)minuitadapt.o: minuitadapt.cc minuitadapt.h minuitprot.h
-
-#----------------------------------------------------------------------
-ifdef NOSHLIB
-LIBS = -L$(LIB) -lFitsIOServer -lSamba -lSkyMap -lSkyT -lNTools -lHiStats -lTArray -lSysTools -lm
-ifeq ($(CXX),cxx)
-LIBS := $(LIBS) -lertcxx
-endif
-else
-LIBS = -L$(SLB) -lsophya -lextsophya  -lm
-endif
-LIBMINUIT := -L$(LIB) -lMinuitAdapt -L$(EXTLIBPATH) -lminuit
-LDLIBS := $(LIBS) $(LDLIBS) $(LIBMINUIT) $(LIBFORT)
 
 test: testminuit
 
+
+$(SOPHYALIBP)libMinuitAdapt.a : $(SOPHYAOBJP)minuitadapt.o $(SOPHYAOBJP)minuitadaptF.o
+	$(AR) $(ARFLAGS) $@ $?
+
+$(SOPHYAOBJP)minuitadapt.o: minuitadapt.cc minuitadapt.h minuitprot.h
+	$(CXXCOMPILE) -o $@ $<
+
+$(SOPHYAOBJP)minuitadaptF.o: minuitadaptF.f
+	$(FCCOMPILE) -o $@ $<
+	
 testminuit: testminuit.o
-	$(LINK.cc) $^ -o $@ $(LOADLIBES) $(LDLIBS)
-$(OBJ)testminuit.o: testminuit.cc
+	$(CXXLINK) $^ -o $@ $(SOPHYAEXTSLBLIST)
+testminuit.o: testminuit.cc
Index: trunk/SophyaExt/MinuitAdapt/minuitadapt.cc
===================================================================
--- trunk/SophyaExt/MinuitAdapt/minuitadapt.cc	(revision 2742)
+++ trunk/SophyaExt/MinuitAdapt/minuitadapt.cc	(revision 2743)
@@ -3,5 +3,5 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <iostream.h>
+#include <iostream>
 #include <string.h>
 #include <string>
Index: trunk/SophyaExt/MinuitAdapt/objlist.list
===================================================================
--- trunk/SophyaExt/MinuitAdapt/objlist.list	(revision 2743)
+++ trunk/SophyaExt/MinuitAdapt/objlist.list	(revision 2743)
@@ -0,0 +1,2 @@
+minuitadapt.o
+minuitadaptF.o
Index: trunk/SophyaExt/MinuitAdapt/smakefile
===================================================================
--- trunk/SophyaExt/MinuitAdapt/smakefile	(revision 2743)
+++ trunk/SophyaExt/MinuitAdapt/smakefile	(revision 2743)
@@ -0,0 +1,27 @@
+include $(SOPHYABASE)/include/sophyamake.inc
+
+CPPFLAGS := $(CPPFLAGS) -Df2cFortran
+CXXFLAGS := $(CXXFLAGS) -Df2cFortran
+ 
+all: $(SOPHYALIBP)libMinuitAdapt.a
+
+clean:
+	rm -f $(SOPHYAOBJP)minuitadapt.o $(SOPHYAOBJP)minuitadaptF.o
+	rm -f $(SOPHYALIBP)libMinuitAdapt.a
+	rm -f testminuit testminuit.o
+
+test: testminuit
+
+
+$(SOPHYALIBP)libMinuitAdapt.a : $(SOPHYAOBJP)minuitadapt.o $(SOPHYAOBJP)minuitadaptF.o
+	$(AR) $(ARFLAGS) $@ $?
+
+$(SOPHYAOBJP)minuitadapt.o: minuitadapt.cc minuitadapt.h minuitprot.h
+	$(CXXCOMPILE) -o $@ $<
+
+$(SOPHYAOBJP)minuitadaptF.o: minuitadaptF.f
+	$(FCCOMPILE) -o $@ $<
+	
+testminuit: testminuit.o
+	$(CXXLINK) $^ -o $@ $(SOPHYAEXTSLBLIST)
+testminuit.o: testminuit.cc
Index: trunk/SophyaExt/MinuitAdapt/testminuit.cc
===================================================================
--- trunk/SophyaExt/MinuitAdapt/testminuit.cc	(revision 2742)
+++ trunk/SophyaExt/MinuitAdapt/testminuit.cc	(revision 2743)
@@ -5,5 +5,5 @@
 #include <stdlib.h>
 #include <stdio.h>
-#include <iostream.h>
+#include <iostream>
 #include <math.h>
 #include <string.h>
Index: trunk/SophyaExt/XAstroPack/Makefile
===================================================================
--- trunk/SophyaExt/XAstroPack/Makefile	(revision 2742)
+++ trunk/SophyaExt/XAstroPack/Makefile	(revision 2743)
@@ -1,17 +1,40 @@
-include ../Mgr/Makefile.h
+include ../BuildMgr/sophyamake.inc
+
+all: $(SOPHYALIBP)libXAstroPack.a
+
+clean: cleantest
+	rm -f $(SOPHYAOBJP)mollweide.o $(SOPHYAOBJP)tstxastro.o \
+              $(SOPHYAOBJP)xastropack.o $(SOPHYAOBJP)magfield.o
+	rm -f $(SOPHYALIBP)libXAstroPack.a
+
+cleantest:
+	rm -f *.o tstxastro tstmollweide mollw.data mollw2.data
+
+$(SOPHYALIBP)libXAstroPack.a : $(SOPHYAOBJP)magfield.o \
+             $(SOPHYAOBJP)mollweide.o $(SOPHYAOBJP)xastropack.o
+	$(AR) $(ARFLAGS) $@ $?
  
-all: $(LIB)libXAstroPack.a
-clean:
-	rm -f $(OBJ)mollweide.o $(OBJ)tstxastro.o $(OBJ)xastropack.o $(OBJ)magfield.o
-	rm -f $(LIB)libXAstroPack.a
-$(LIB)libXAstroPack.a : $(OBJ)magfield.o $(OBJ)mollweide.o $(OBJ)xastropack.o
-	$(ARCXX) $(ARCXXFLAGS) $@ $($(ARARGS))
-ifeq ($(CXX),cxx)
-	$(CXX) $? $(CPPFLAGS) $(CXXFLAGS) -o $(OBJ)xx.x -Hf
-endif 
- 
-$(OBJ)mollweide.o: mollweide.cc mollweide.h
-$(OBJ)xastropack.o: xastropack.cc xastropack.h \
- $(INC)machdefs.h \
- $(EXTINCPATH)XAstro/astro.h
-$(OBJ)magfield.o: magfield.c magfield.h
+$(SOPHYAOBJP)mollweide.o: mollweide.cc mollweide.h
+	$(CXXCOMPILE) -o $@ $<
+
+$(SOPHYAOBJP)xastropack.o: xastropack.cc xastropack.h \
+ $(SOPHYAINCP)machdefs.h \
+ $(SOPHYAINCP)XAstro/astro.h
+	$(CXXCOMPILE) -o $@ $<
+
+$(SOPHYAOBJP)magfield.o: magfield.c magfield.h
+	$(CCOMPILE) -o $@ $<
+
+#---------------------
+tstxastro: tstxastro.o $(SOPHYAOBJP)xastropack.o
+	$(CXXLINK) $^ -o $@ $(SOPEXTLIBP) -lxastro -lc -lm
+
+tstxastro.o: tstxastro.cc
+	$(CXXCOMPILE) -o $@ $<
+
+#---------------------
+tstmollweide: tstmollweide.o $(SOPHYAOBJP)mollweide.o
+	$(CXXLINK) -o $@ $^ $(SOPEXTLIBP) -lxastro -lc -lm
+
+tstmollweide.o: tstmollweide.cc
+	$(CXXCOMPILE) -o $@ $<
Index: trunk/SophyaExt/XAstroPack/smakefile
===================================================================
--- trunk/SophyaExt/XAstroPack/smakefile	(revision 2743)
+++ trunk/SophyaExt/XAstroPack/smakefile	(revision 2743)
@@ -0,0 +1,40 @@
+include $(SOPHYABASE)/include/sophyamake.inc
+
+all: $(SOPHYALIBP)libXAstroPack.a
+
+clean: cleantest
+	rm -f $(SOPHYAOBJP)mollweide.o $(SOPHYAOBJP)tstxastro.o \
+              $(SOPHYAOBJP)xastropack.o $(SOPHYAOBJP)magfield.o
+	rm -f $(SOPHYALIBP)libXAstroPack.a
+
+cleantest:
+	rm -f *.o tstxastro tstmollweide mollw.data mollw2.data
+
+$(SOPHYALIBP)libXAstroPack.a : $(SOPHYAOBJP)magfield.o \
+             $(SOPHYAOBJP)mollweide.o $(SOPHYAOBJP)xastropack.o
+	$(AR) $(ARFLAGS) $@ $?
+ 
+$(SOPHYAOBJP)mollweide.o: mollweide.cc mollweide.h
+	$(CXXCOMPILE) -o $@ $<
+
+$(SOPHYAOBJP)xastropack.o: xastropack.cc xastropack.h \
+ $(SOPHYAINCP)machdefs.h \
+ $(SOPHYAINCP)XAstro/astro.h
+	$(CXXCOMPILE) -o $@ $<
+
+$(SOPHYAOBJP)magfield.o: magfield.c magfield.h
+	$(CCOMPILE) -o $@ $<
+
+#---------------------
+tstxastro: tstxastro.o $(SOPHYAOBJP)xastropack.o
+	$(CXXLINK) $^ -o $@ $(SOPEXTLIBP) -lxastro -lc -lm
+
+tstxastro.o: tstxastro.cc
+	$(CXXCOMPILE) -o $@ $<
+
+#---------------------
+tstmollweide: tstmollweide.o $(SOPHYAOBJP)mollweide.o
+	$(CXXLINK) -o $@ $^ $(SOPEXTLIBP) -lxastro -lc -lm
+
+tstmollweide.o: tstmollweide.cc
+	$(CXXCOMPILE) -o $@ $<
Index: trunk/SophyaExt/XAstroPack/tstmollweide.cc
===================================================================
--- trunk/SophyaExt/XAstroPack/tstmollweide.cc	(revision 2743)
+++ trunk/SophyaExt/XAstroPack/tstmollweide.cc	(revision 2743)
@@ -0,0 +1,39 @@
+//#define TEST_MOLLWEIDE
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include "sopnamsp.h"
+#include "mollweide.h"
+
+int main()
+{
+ FILE *file  = fopen("mollw.data","w");
+ FILE *file2 = fopen("mollw2.data","w");
+ int i,npoints=250000;
+ double tvrai,lon,lat,x,y,tcalc,a;
+ double longitude,latitude,tll,txy;
+
+ tll=txy=0.;
+ for(i=0;i<=npoints;i++) {
+   //tvrai = 1.57078;
+   tvrai = (double)i*(M_PI_2) /(double)npoints;
+   a = 2.*tvrai+sin(2.*tvrai);
+   lat = asin(a/M_PI);
+   tcalc = MollWeide_XY(0.,lat,&x,&y);
+   if(fabs(tcalc-tvrai)>tll) {tll = fabs(tcalc-tvrai); txy=tvrai;}
+   if(file) fprintf(file,"%e %e %e %e\n",tvrai,tcalc,a,tcalc-tvrai);
+ }
+ printf("Maximum difference: %e for t=%.10e=Pi/2-%.10e\n",tll,txy,M_PI_2-txy);
+ if(file) fclose(file);
+
+ for(lon=0.;lon<360.;lon+=2.5) for(lat=-90.;lat<=90.1;lat+=2.5) {
+   txy = MollWeide_XY(lon*M_PI/180.,lat*M_PI/180.,&x,&y);
+   tll = MollWeide_LL(x,y,&longitude,&latitude);
+   longitude *= 180./M_PI;
+   latitude  *= 180./M_PI;
+   if(file2) fprintf(file2,"%e %e %e %e %e %e %e %e %e %e\n"
+     ,lon,lat,x,y,longitude,latitude,txy,tll,longitude-lon,latitude-lat);
+ }
+ if(file2) fclose(file2);
+ return 0;
+}
Index: trunk/SophyaExt/XephemAstroLib/Makefile
===================================================================
--- trunk/SophyaExt/XephemAstroLib/Makefile	(revision 2742)
+++ trunk/SophyaExt/XephemAstroLib/Makefile	(revision 2743)
@@ -1,27 +1,17 @@
-include $(SOPHYABASEREP)/Include/MakefileUser.h
+include ../BuildMgr/sophyamake.inc
 
 all: libxastro.a
 
 clean:
-	rm -f libxastro.a
-	rm -f *.o testxephem
-
-install:
-	if [ ! -d $(EXTINCPATH)/XAstro ] ; then mkdir $(EXTINCPATH)/XAstro ; fi
-	rm -f $(EXTINCPATH)/XAstro/astro.h
-	rm -f $(EXTINCPATH)/XAstro/bdl.h
-	rm -f $(EXTINCPATH)/XAstro/P_.h
-	rm -f $(EXTLIBPATH)/libxastro.a
-	cp *.h $(EXTINCPATH)/XAstro/.
-	cp libxastro.a $(EXTLIBPATH)/.
+	rm -f libxastro.a *.o testxephem
 
 OBJASTRO := $(addsuffix .o,$(basename $(wildcard *.c)))
 
 libxastro.a : $(OBJASTRO)
-	$(AR) $(ARFLAGS) $@ $(OBJASTRO)
+	$(AR) $(ARFLAGS) $@ $?
 
 %.o: %.c
-	$(COMPILE.c) -o $@ $<
+	$(CCOMPILE) -o $@ $<
 
 testxephem: testxephem.o
-	$(LINK.c) -o $@ $^ -L$(EXTLIBPATH) -lxastro -lc -lm
+	$(CLINK) -o $@ $^ -L./ -lxastro -lc -lm
Index: trunk/SophyaExt/XephemAstroLib/smakefile
===================================================================
--- trunk/SophyaExt/XephemAstroLib/smakefile	(revision 2743)
+++ trunk/SophyaExt/XephemAstroLib/smakefile	(revision 2743)
@@ -0,0 +1,17 @@
+include $(SOPHYABASE)/include/sophyamake.inc
+
+all: libxastro.a
+
+clean:
+	rm -f libxastro.a *.o testxephem
+
+OBJASTRO := $(addsuffix .o,$(basename $(wildcard *.c)))
+
+libxastro.a : $(OBJASTRO)
+	$(AR) $(ARFLAGS) $@ $?
+
+%.o: %.c
+	$(CCOMPILE) -o $@ $<
+
+testxephem: testxephem.o
+	$(CLINK) -o $@ $^ -L./ -lxastro -lc -lm
