Ticket #33559: patch-Makefile.so.diff
File patch-Makefile.so.diff, 2.4 KB (added by lockhart (Thomas Lockhart), 13 years ago) |
---|
-
Makefile.so
old new 6 6 # major & minor shared lib numbers 7 7 MAJ=2 8 8 MIN=2 9 ODIR=sobj # where to place object files for shared lib 9 # ODIR defines where to place object files for shared lib 10 ODIR=sobj 10 11 CC=gcc 11 12 CONFIGFLAGS=-ULINSOLVERS_RETAIN_MEMORY 12 13 #ARCHFLAGS=-march=pentium4 # YOU MIGHT WANT TO UNCOMMENT THIS FOR P4 … … 14 15 LAPACKLIBS_PATH=/usr/local/lib # WHEN USING LAPACK, CHANGE THIS TO WHERE YOUR COMPILED LIBS ARE! 15 16 LIBOBJS=$(ODIR)/lm.o $(ODIR)/Axb.o $(ODIR)/misc.o $(ODIR)/lmlec.o $(ODIR)/lmbc.o $(ODIR)/lmblec.o $(ODIR)/lmbleic.o 16 17 LIBSRCS=lm.c Axb.c misc.c lmlec.c lmbc.c lmblec.c lmbleic.c 17 LAPACKLIBS=-llapack -lblas -lf2c # comment this line if you are not using LAPACK. 18 DEMOBJS=lmdemo.o 19 DEMOSRCS=lmdemo.c 20 # -lf2c removed from LAPACKLIBS for Fedora 21 # comment the following line if you are not using LAPACK. 22 LAPACKLIBS=-llapack -lblas 18 23 # On systems with a FORTRAN (not f2c'ed) version of LAPACK, -lf2c is 19 24 # not necessary; on others, -lf2c is equivalent to -lF77 -lI77 20 25 21 26 LIBS=$(LAPACKLIBS) 22 27 23 $(ODIR)/liblevmar.so.$(MAJ).$(MIN): $(LIBOBJS) 24 $(CC) -shared -Wl,-soname,liblevmar.so.$(MAJ) -o $(ODIR)/liblevmar.so.$(MAJ).$(MIN) $(LIBOBJS) #-llapack -lblas -lf2c 28 all: $(ODIR)/liblevmar.$(MAJ).$(MIN).dylib lmdemo 29 30 $(ODIR)/liblevmar.$(MAJ).$(MIN).dylib: $(LIBOBJS) 31 $(CC) -shared -Wl,-install_name,@rpath/liblevmar.$(MAJ).dylib -o $(ODIR)/liblevmar.$(MAJ).$(MIN).dylib $(LIBOBJS) $(LIBS) 32 33 $(ODIR)/liblevmar.dylib: $(ODIR)/liblevmar.$(MAJ).$(MIN).dylib 34 ln -s liblevmar.$(MAJ).$(MIN).dylib $(ODIR)/liblevmar.dylib 35 ln -s liblevmar.$(MAJ).$(MIN).dylib $(ODIR)/liblevmar.$(MAJ).dylib 25 36 26 37 # implicit rule for generating *.o files in ODIR from *.c files 27 38 $(ODIR)/%.o : %.c … … 36 46 $(ODIR)/lmblec.o: lmblec.c lmblec_core.c levmar.h misc.h 37 47 $(ODIR)/lmbleic.o: lmbleic.c lmbleic_core.c levmar.h misc.h 38 48 49 lmdemo.o: levmar.h 50 51 lmdemo: $(DEMOBJS) $(ODIR)/liblevmar.dylib 52 $(CC) $(LDFLAGS) $(DEMOBJS) -o lmdemo -L$(ODIR) -llevmar $(LIBS) -lm # -u MAIN__ 53 39 54 clean: 40 55 @rm -f $(LIBOBJS) 41 56 42 57 cleanall: clean 43 @rm -f $(ODIR)/liblevmar. so.$(MAJ).$(MIN)58 @rm -f $(ODIR)/liblevmar.$(MAJ).$(MIN).dylib 44 59 45 60 depend: 46 makedepend -f Makefile $(LIBSRCS) 61 makedepend -f Makefile $(LIBSRCS) $(DEMOSRCS) 47 62 48 63 # DO NOT DELETE THIS LINE -- make depend depends on it. 49 64