From fd80a0b9639d20613ba5858766f674cab3acbdae Mon Sep 17 00:00:00 2001 From: buisson Date: Thu, 4 Apr 2002 15:05:51 +0000 Subject: Add new Makefile for mac osx platform --- src/Makefile.osx | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 src/Makefile.osx (limited to 'src/Makefile.osx') diff --git a/src/Makefile.osx b/src/Makefile.osx new file mode 100644 index 0000000..aa45c3d --- /dev/null +++ b/src/Makefile.osx @@ -0,0 +1,90 @@ +# +# Ivy, C interface +# +# Copyright (C) 1997-1999 +# Centre d'Études de la Navigation Aérienne +# +# Makefile for OS X +# +# Authors: Marcellin Buisson +# +# $Id$ +# +# Please refer to file version.h for the +# copyright notice regarding this software +# + + +MAJOR=3 +MINOR=1 + +CC=cc +CFLAGS = -g +OBJ = ivyloop.o timer.o ivysocket.o ivy.o +GOBJ = ivyloop.o timer.o ivysocket.o givy.o +TCLOBJ = ivytcl.o ivysocket.o givy.o +TARGETS = ivyprobe + +.c.o: + $(CC) $(CFLAGS) -c $*.c + +all: static-libs commands shared-libs + +static-libs: libivy.a + +shared-libs: libivy.$(MAJOR).$(MINOR).dylib + +tcl-exts: ivytcl.so.$(MAJOR).$(MINOR) + +commands: $(TARGETS) + +givy.o: ivy.c + $(CC) -DGNU_REGEXP -c $(CFLAGS) -o givy.o ivy.c + +ivyprobe: ivyprobe.o libivy.a + $(CC) $(CFLAGS) -o ivyprobe ivyprobe.o -L. -livy + +libivy.a: $(OBJ) + rm -f $@ + ar r $@ $(OBJ) + ranlib $@ + +libgivy.a: $(GOBJ) + rm -f $@ + ar r $@ $(GOBJ) + +libivy.$(MAJOR).$(MINOR).dylib: $(OBJ) + $(CC) -dynamiclib -o $@ $(OBJ) -lc + +ivytcl.so.$(MAJOR).$(MINOR): $(TCLOBJ) + #$(CC) -shared -Wl,-soname,ivytcl.so.$(MAJOR) -o $@ \ + $(CC) -dynamiclib -o $@ \ + + $(TCLOBJ) -L$(TCLLIB) -ltcl -lc + +clean: + -rm -f $(TARGETS) *.o *.a *.so *.so.* *~ + +install: all + test -d $(PREFIX)/usr/bin || mkdirhier $(PREFIX)/usr/bin + test -d $(PREFIX)/usr/lib || mkdirhier $(PREFIX)/usr/lib + test -d $(PREFIX)/usr/include || mkdirhier $(PREFIX)/usr/include + install -m755 ivyprobe $(PREFIX)/usr/bin + + install -m644 libivy.a $(PREFIX)/usr/lib + + install -m644 libivy.$(MAJOR).$(MINOR).dylib $(PREFIX)/usr/lib +# ln -s /usr/lib/ivytcl.so.$(MAJOR).$(MINOR) $(PREFIX)/usr/lib/ivytcl.so +# ln -s /usr/lib/libivy.$(MAJOR).$(MINOR).dylib $(PREFIX)/usr/lib/libivy.dylib +# ln -s /usr/lib/libivy.$(MAJOR).$(MINOR).dylib $(PREFIX)/usr/lib/libivy.$(MAJOR).dylib + + install -m644 -c *.h $(PREFIX)/usr/include +# test -d $(PREFIX)/usr/local/doc/ivy-c || mkdir $(PREFIX)/usr/local/doc/ivy-c +# for f in `find ../doc/*.html -type f `; do \#-maxdepth 1`; do \ +# install -m 644 $$f $(PREFIX)/usr/local/doc/ivy-c; \ +# done +# test -d $(PREFIX)/usr/local/man/man1 || mkdir $(PREFIX)/usr/local/man/man1 +# for f in `find ../doc/*.1 -type f `; do \#-maxdepth 1`; do \ +# install -m 644 $$f $(PREFIX)/usr/local/man/man1; \ +# done + -- cgit v1.1