1
0
Fork 0

Just build qfits library, not apps

qfits
Jeff Moe 2022-08-06 21:09:16 -06:00
parent 07cf42ea8c
commit d347e08c3f
1 changed files with 1 additions and 105 deletions

View File

@ -8,8 +8,6 @@ ARFLAGS = rcs
RM = rm -f
CP = cp -f
# Implicit rules
SUFFIXES = .o .c .h .a .so .sl
COMPILE.c=$(CC) $(CFLAGS) -Iinclude $(RELOC) -c
@ -41,7 +39,7 @@ OBJS = $(SRCS:.c=.o)
default: all
all: $(TARGETS) progs
all: $(TARGETS)
check:
@(if test -d ./test ; then\
@ -53,111 +51,9 @@ check:
static: lib/libqfits.a
dynamic: lib/libqfits.$(DYNSUF)
lib/libqfits.a: $(OBJS)
@(echo "Building static library...")
@($(AR) $(ARFLAGS) lib/libqfits.a $(OBJS))
lib/libqfits.$(DYNSUF): $(OBJS)
@(echo "Building shared library...")
@(ld $(SHARED) -o lib/libqfits.$(DYNSUF) $(OBJS) -lc)
install:
@(echo "Installing library in " $(prefix))
mkdir -p $(prefix)
mkdir -p $(prefix)/lib
mkdir -p $(prefix)/include
mkdir -p $(prefix)/bin
@(if test -f ./include/qfits.h ; then\
($(CP) include/qfits.h $(prefix)/include); \
else (true) fi)
@(if test -f ./include/xmemory.h ; then\
($(CP) include/xmemory.h $(prefix)/include); \
else (true) fi)
@(if test -f ./lib/libqfits.a ; then\
($(CP) lib/libqfits.a $(prefix)/lib); \
else (true) fi)
@(if test -f ./lib/libqfits.$(DYNSUF) ; then\
($(CP) lib/libqfits.$(DYNSUF) $(prefix)/lib); \
else (true) fi)
@(if test -f ./bin/dfits ; then\
($(CP) bin/dfits $(prefix)/bin); \
else (true) fi)
@(if test -f ./bin/dtfits ; then\
($(CP) bin/dtfits $(prefix)/bin); \
else (true) fi)
@(if test -f ./bin/fitsmd5 ; then\
($(CP) bin/fitsmd5 $(prefix)/bin); \
else (true) fi)
@(if test -f ./bin/fitsort ; then\
($(CP) bin/fitsort $(prefix)/bin); \
else (true) fi)
@(if test -f ./bin/flipx ; then\
($(CP) bin/flipx $(prefix)/bin); \
else (true) fi)
@(if test -f ./bin/hierarch28 ; then\
($(CP) bin/hierarch28 $(prefix)/bin); \
else (true) fi)
@(if test -f ./bin/iofits ; then\
($(CP) bin/iofits $(prefix)/bin); \
else (true) fi)
@(if test -f ./bin/replacekey ; then\
($(CP) bin/replacekey $(prefix)/bin); \
else (true) fi)
@(if test -f ./bin/qextract ; then\
($(CP) bin/qextract $(prefix)/bin); \
else (true) fi)
@(if test -f ./bin/frameq ; then\
($(CP) bin/frameq $(prefix)/bin); \
else (true) fi)
clean:
$(RM) $(OBJS)
veryclean:
$(RM) $(OBJS) lib/libqfits.a lib/libqfits.$(DYNSUF)
$(RM) -r build
@(if test -d ./test ; then \
(cd test ; $(MAKE) veryclean ; cd ..) \
else (true) fi)
cd main ; $(MAKE) veryclean ; cd ..
cd saft ; $(MAKE) veryclean ; cd ..
$(RM) config.make
#
# Build example and stand-alone programs
#
progs:
cd main ; $(MAKE) ; cd ..
cd saft ; $(MAKE) ; cd ..
#
# Building qfits as a Python module.
#
# type:
# % python setup.py build
# % python setup.py install
#
docs:
@(echo "Building HTML documentation...")
@(cd doc ; $(MAKE))