diff options
Diffstat (limited to 'vendor/voclient/common/Makefile')
-rw-r--r-- | vendor/voclient/common/Makefile | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/vendor/voclient/common/Makefile b/vendor/voclient/common/Makefile new file mode 100644 index 00000000..75c735f6 --- /dev/null +++ b/vendor/voclient/common/Makefile @@ -0,0 +1,89 @@ +#/////////////////////////////////////////////////////////////////////////////// +#// +#// Makefile for the common libraries +#// +#/////////////////////////////////////////////////////////////////////////////// + +# primary dependencies + +NAME = Common +VERSION = 1.0 +PLATFORM := $(shell uname -s) +PLMACH := $(shell uname -m) +HERE := $(shell /bin/pwd) +BINDIR := ../bin/ +LIBDIR := ../lib/ +INCDIR := ../include/ + + +# includes, flags and libraries +CC = gcc +CINCS = -I$(INCDIR) -I./ +ifeq ($(PLATFORM),Darwin) + ifeq ($(PLATFORM),x86_64) + CARCH = -m64 -mmacosx-version-min=10.5 + else + CARCH = -mmacosx-version-min=10.5 + endif + LIBS = -lm -lc +else + CARCH = + LIBS = -lm -lc -lpthread +endif + +CFLAGS = -g -Wall $(CARCH) -D$(PLATFORM) $(CINCS) -L./ + + +all:: expat cfitsio curl + +libs:: + (/bin/csh -f mklibs) + (cd expat ; ./configure --prefix=${HERE}/../; \ make ; make installlib) + +curl:: + (/bin/csh -f mklibs) + +expat:: + (cd expat ; ./configure --prefix=${HERE}/../; \ make ; make installlib) + +cfitsio:: + (cd cfitsio ; /bin/csh -f mklibs) + +apps: + +install: + (if [ "${PLATFORM}" != "Darwin" ]; then (cd curl ; make install); fi) + (cd expat ; make install) + (/bin/rm -rf ../man ../share) + +clean: + (if [ "${PLATFORM}" != "Darwin" ]; then (cd curl ; make clean); fi) + (cd expat ; make clean) + (cd cfitsio ; make clean) + +distclean: + (if [ "${PLATFORM}" != "Darwin" ]; then (cd curl ; make distclean); fi) + (cd expat ; make distclean) + #(cd cfitsio ; make distclean) + + + +############################################################################### +# Leave this stuff alone. +############################################################################### + +$(STATICLIB): $(SRCS:%.c=Static/%.o) + /usr/bin/ar rv $@ $? +Static/%.o: %.c $(INCS) + /usr/bin/gcc $(CINCS) $(CFLAGS) -c $< -o $@ +Static: + /bin/mkdir $@ + chmod 777 $@ + +$(SHAREDLIB): $(SRCS:%.c=Shared/%.o) + /usr/bin/ld -shared -o $@ $? -lc -ldl +Shared/%.o: %.c $(INCS) + /usr/bin/gcc $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@ +Shared: + /bin/mkdir $@ + chmod 777 $@ |