Blob Blame History Raw
diff -ur wcstools-3.6.4.orig/libwcs/Makefile wcstools-3.6.4/libwcs/Makefile
--- wcstools-3.6.4.orig/libwcs/Makefile	2006-04-19 22:10:07.000000000 +0200
+++ wcstools-3.6.4/libwcs/Makefile	2006-06-12 13:24:01.000000000 +0200
@@ -1,5 +1,4 @@
-CFLAGS= -g
-CC= cc
+CFLAGS =
 
 OBJS =	imsetwcs.o imgetwcs.o matchstar.o findstar.o daoread.o wcscon.o \
 	fitswcs.o wcsinit.o wcs.o ty2read.o webread.o tmcread.o \
@@ -11,10 +10,17 @@
 	sortstar.o platefit.o iget.o fileutil.o polfit.o \
 	wcslib.o lin.o cel.o proj.o sph.o wcstrig.o distort.o
 
+all: libwcs.a libwcs.so.3.0.0
+
 libwcs.a:	$(OBJS)
 	ar rv $@ $?
 	ranlib $@
 
+libwcs.so.3.0.0: $(OBJS)
+	$(CC) $(CFLAGS) -shared -o $@ -Wl,-soname,libwcs.so.3 $?
+	ln -s libwcs.so.3.0.0 libwcs.so.3
+	ln -s libwcs.so.3.0.0 libwcs.so
+
 actread.o:	fitsfile.h wcscat.h wcs.h fitshead.h wcslib.h
 binread.o:	wcscat.h wcs.h fitshead.h wcslib.h
 ctgread.o:	wcscat.h wcs.h fitshead.h wcslib.h
@@ -65,4 +71,4 @@
 worldpos.o:	wcs.h fitshead.h wcslib.h
 
 clean:
-	rm -f *.a *.o
+	rm -f *.a *.o *.so*
diff -ur wcstools-3.6.4.orig/Makefile wcstools-3.6.4/Makefile
--- wcstools-3.6.4.orig/Makefile	2006-04-26 00:14:19.000000000 +0200
+++ wcstools-3.6.4/Makefile	2006-06-12 13:19:10.000000000 +0200
@@ -1,8 +1,5 @@
-CFLAGS= -g
-CC= cc
-LIBWCS = libwcs/libwcs.a
-LIBS = $(LIBWCS) -lm
-#CATLIBS = $(LIBS) -lnsl -lsocket
+LIBWCS = libwcs/libwcs.so
+LIBS = -L./libwcs -lwcs -lm
 CATLIBS = $(LIBS)
 BIN = bin
 .PRECIOUS: ${LIBWCS}
@@ -22,7 +19,7 @@
 	$(CC) $(CFLAGS) -o $(BIN)/bincat bincat.c $(CATLIBS)
 
 char2sp: char2sp.c $(LIBWCS) libwcs/fitsfile.h
-	$(CC) $(CFLAGS) -o $(BIN)/char2sp char2sp.c $(LIBWCS)
+	$(CC) $(CFLAGS) -o $(BIN)/char2sp char2sp.c $(LIBS)
 
 conpix: conpix.c $(LIBWCS) libwcs/fitsfile.h
 	$(CC) $(CFLAGS) -o $(BIN)/conpix conpix.c $(LIBS)
@@ -151,7 +148,7 @@
 	$(CC) $(CFLAGS) -o $(BIN)/skycoor skycoor.c $(CATLIBS)
 
 sp2char: sp2char.c $(LIBWCS) libwcs/fitsfile.h
-	$(CC) $(CFLAGS) -o $(BIN)/sp2char sp2char.c $(LIBWCS)
+	$(CC) $(CFLAGS) -o $(BIN)/sp2char sp2char.c $(LIBS)
 
 subpix: subpix.c $(LIBWCS) libwcs/fitsfile.h
 	$(CC) $(CFLAGS) -o $(BIN)/subpix subpix.c $(LIBS)
@@ -169,13 +166,13 @@
 	$(CC) $(CFLAGS) -o $(BIN)/simpos simpos.c $(CATLIBS)
 
 $(LIBWCS): libwcs/*.c libwcs/*.h
-	cd libwcs; make
+	$(MAKE) -C libwcs
 
 objclean:
-	cd libwcs; make clean
+	$(MAKE) -C libwcs clean
 
 binclean:
 	rm -f ./bin/*
 
 clean:
-	make objclean; make binclean
+	$(MAKE) objclean; $(MAKE) binclean