aboutsummaryrefslogtreecommitdiff
path: root/vendor/voclient/voapps/lib/Makefile
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /vendor/voclient/voapps/lib/Makefile
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'vendor/voclient/voapps/lib/Makefile')
-rw-r--r--vendor/voclient/voapps/lib/Makefile134
1 files changed, 134 insertions, 0 deletions
diff --git a/vendor/voclient/voapps/lib/Makefile b/vendor/voclient/voapps/lib/Makefile
new file mode 100644
index 00000000..166d64b6
--- /dev/null
+++ b/vendor/voclient/voapps/lib/Makefile
@@ -0,0 +1,134 @@
+#///////////////////////////////////////////////////////////////////////////////
+#//
+#// Makefile for the VOClient Package Applications
+#//
+#///////////////////////////////////////////////////////////////////////////////
+
+# primary dependencies
+
+NAME = VOApps
+VERSION = 1.0
+PLATFORM := $(shell uname -s)
+PLMACH := $(shell uname -m)
+HERE := $(shell /bin/pwd)
+BINDIR := ../../bin/
+LIBDIR := ../../lib/
+INCDIR := ../../include/
+
+
+# secondary dependencies
+LIBBASE = ../lib$(NAME)
+STATICLIB = $(HERE)/$(LIBBASE).a
+SHAREDLIB = $(HERE)/$(LIBBASE).so.$(VERSION)
+
+
+# stuff that's precious to keep
+.PRECIOUS: $(STATICLIB) $(SHAREDLIB)
+.KEEP_STATE:
+
+
+# includes, flags and libraries
+CC = gcc
+CINCS = -I$(HERE) -I../ -I../../include -I../../../../include -L../../lib/
+
+
+ifeq ($(PLATFORM),Darwin)
+ ifeq ($(PLMACH),x86_64)
+ CARCH = -m64 -mmacosx-version-min=10.5
+ else
+ CARCH = -arch i386 -m32 -mmacosx-version-min=10.4
+ endif
+ ifdef IRAFARCH
+ ifeq ($(IRAFARCH),macintel)
+ CARCH = -m64 -mmacosx-version-min=10.5
+ else
+ CARCH = -arch i386 -m32 -mmacosx-version-min=10.5
+ endif
+ endif
+else
+ CLIBS = -lm -lc -lcurl -lpthread
+ CARCH =
+endif
+
+CLIBS = -lm -lc -lcurl -lpthread -lm
+CFLAGS = -g -Wall $(CARCH) -D$(PLATFORM) $(CINCS) -L./
+
+
+
+
+
+# list of source and include files
+
+SRCS = voObj.c voSvc.c voAclist.c voDALUtil.c voFITS.c voUtil.c \
+ voSCS.c voSIAP.c voSSAP.c voUtil.c voRanges.c voLog.c \
+ voKML.c voXML.c voHTML.c voTask.c voParams.c vosUtil.c
+OBJS = voObj.o voSvc.o voAclist.o voDALUtil.o voFITS.o voUtil.o \
+ voSCS.o voSIAP.o voSSAP.o voUtil.o voRanges.o voLog.o \
+ voKML.o voXML.o voHTML.o voTask.o voParams.o vosUtil.o
+INCS = ../voApps.h ../voAppsP.h
+
+
+all: lib
+
+install: all
+
+objs: $(OBJS)
+
+
+# Targets
+
+clean:
+ /bin/rm -rf .make.state .nse_depinfo *.[aeo] *.dSYM
+ /bin/rm -rf $(TARGETS)
+
+everything:
+ make clean
+ make all
+ make install
+
+help: HELP
+
+install: all
+
+
+
+####################################
+# LIBVOAPPS dependency libraries.
+####################################
+
+lib: objs
+ ar rv ../lib$(NAME).a $(OBJS)
+ $(RM) $(OBJS)
+
+
+
+###############################################################################
+# Unit test programs to be built.
+###############################################################################
+
+demo: $(TARGETS)
+
+zztest: zztest.c
+ $(CC) $(CFLAGS) -o zztest zztest.c $(LIBS)
+
+
+
+###############################################################################
+# Leave this stuff alone.
+###############################################################################
+
+$(STATICLIB): $(C_SRCS:%.c=Static/%.o)
+ /usr/bin/ar rv $@ $?
+Static/%.o: %.c $(C_INCS)
+ /usr/bin/gcc $(CINCS) $(CFLAGS) -c $< -o $@
+Static:
+ /bin/mkdir $@
+ chmod 777 $@
+
+$(SHAREDLIB): $(C_SRCS:%.c=Shared/%.o)
+ /usr/bin/ld -shared -o $@ $? -lc -ldl
+Shared/%.o: %.c $(C_INCS)
+ /usr/bin/gcc $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
+Shared:
+ /bin/mkdir $@
+ chmod 777 $@