103 lines
3.2 KiB
Diff
103 lines
3.2 KiB
Diff
diff -ur wcstools-3.6.7.old/libwcs/Makefile wcstools-3.6.7/libwcs/Makefile
|
|
--- wcstools-3.6.7.old/libwcs/Makefile 2007-01-10 20:26:36.000000000 +0100
|
|
+++ wcstools-3.6.7/libwcs/Makefile 2007-02-26 15:42:32.000000000 +0100
|
|
@@ -11,10 +11,18 @@
|
|
sortstar.o platefit.o iget.o fileutil.o \
|
|
wcslib.o lin.o cel.o proj.o sph.o wcstrig.o distort.o
|
|
|
|
+all: libwcs.a libwcs.so.0.0.0
|
|
+
|
|
libwcs.a: $(OBJS)
|
|
ar rv $@ $?
|
|
ranlib $@
|
|
|
|
+libwcs.so.0.0.0: $(OBJS)
|
|
+ $(CC) $(CFLAGS) -shared -o $@ -Wl,-soname,libwc.so.0 $?
|
|
+ ln -s libwcs.so.0.0.0 libwcs.so.0
|
|
+ ln -s libwcs.so.0.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
|
|
@@ -64,4 +72,4 @@
|
|
worldpos.o: wcs.h fitshead.h wcslib.h
|
|
|
|
clean:
|
|
- rm -f *.a *.o
|
|
+ rm -f *.a *.o *.so*
|
|
--- wcstools-3.6.8.old/Makefile 2007-02-28 21:44:24.000000000 +0100
|
|
+++ wcstools-3.6.8/Makefile 2007-03-19 17:36:28.000000000 +0100
|
|
@@ -1,6 +1,6 @@
|
|
CFLAGS= -g
|
|
CC= cc
|
|
-LIBWCS = libwcs/libwcs.a
|
|
+LIBWCS = -L`pwd`/libwcs -lwcs
|
|
LIBS = $(LIBWCS) -lm
|
|
#CATLIBS = $(LIBS) -lnsl -lsocket
|
|
CATLIBS = $(LIBS)
|
|
@@ -19,10 +19,10 @@
|
|
$(CC) $(CFLAGS) -o $(BIN)/addpix addpix.c $(LIBS)
|
|
|
|
bincat: bincat.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h
|
|
- $(CC) $(CFLAGS) -o $(BIN)/bincat bincat.c $(CATLIBS)
|
|
+ $(CC) $(CFLAGS) -o $(BIN)/bincat bincat.c $(LIBS)
|
|
|
|
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 +151,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 +169,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
|
|
diff -ur wcstools-3.6.8/libwcs/imhfile.c wcstools-3.6.8.new/libwcs/imhfile.c
|
|
--- wcstools-3.6.8/libwcs/imhfile.c 2007-03-19 18:26:41.000000000 +0100
|
|
+++ wcstools-3.6.8.new/libwcs/imhfile.c 2007-03-19 18:40:26.000000000 +0100
|
|
@@ -1036,11 +1036,11 @@
|
|
int len;
|
|
char *newpixname;
|
|
|
|
- newpixname = (char *) calloc (SZ_IM2PIXFILE, 1);
|
|
+ newpixname = (char *) calloc (SZ_IM2PIXFILE + 1, sizeof(char));
|
|
|
|
/* Pixel file is in same directory as header */
|
|
if (strncmp(pixname, "HDR$", 4) == 0 ) {
|
|
- (void)strncpy (newpixname, hdrname, SZ_IM2PIXFILE);
|
|
+ strncpy (newpixname, hdrname, SZ_IM2PIXFILE);
|
|
|
|
/* find the end of the pathname */
|
|
len = strlen (newpixname);
|
|
@@ -1053,7 +1053,7 @@
|
|
|
|
/* add name */
|
|
newpixname[len] = '\0';
|
|
- (void)strncat (newpixname, &pixname[4], SZ_IM2PIXFILE);
|
|
+ strncat (newpixname, &pixname[4], SZ_IM2PIXFILE);
|
|
}
|
|
|
|
/* Bare pixel file with no path is assumed to be same as HDR$filename */
|