home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Divers / freedraft.tar.gz / freedraft.tar / FREEdraft-050298 / GEOMLIB2D / Makefile < prev    next >
Makefile  |  1998-04-27  |  2KB  |  65 lines

  1. # GEOMLIB2D subdirectory Makefile
  2.  
  3. # Copyright (C) 1998  Cliff Johnson                                       #
  4. #                                                                         #
  5. # This program is free software; you can redistribute it and/or           #
  6. # modify it under the terms of the GNU  General Public                    #
  7. # License as published by the Free Software Foundation; either            #
  8. # version 2 of the License, or (at your option) any later version.        #
  9. #                                                                         #
  10. # This software is distributed in the hope that it will be useful,        #
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of          #
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       #
  13. # General Public License for more details.                                #
  14. #                                                                         #
  15. # You should have received a copy of the GNU General Public License       #
  16. # along with this software (see COPYING.LIB); if not, write to the        #
  17. # Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #
  18.  
  19. FREEROOT=..
  20. include $(FREEROOT)/Makefile.in
  21.  
  22. CFLAGS+= -fPIC 
  23.  
  24. SRCS =     circle.cpp \
  25.     geom.cpp \
  26.     geomlib2d.cpp \
  27.     line.cpp \
  28.     point.cpp \
  29.     segment.cpp \
  30.     arc.cpp \
  31.     pick.cpp \
  32.     pickgeom.cpp \
  33.     geomexception.cpp 
  34.  
  35. OBJS = $(SRCS:%.cpp=%.o)
  36.  
  37. all : library
  38.  
  39. library: $(OBJS)
  40.     $(CXX) -shared -Wl,-soname,libGeom2D.so.0 -o libGeom2D.so.0.3 $(OBJS)
  41.     ln -sf libGeom2D.so.0.3 libGeom2D.so.0
  42.     ln -sf libGeom2D.so.0 libGeom2D.so
  43.  
  44. %.o : %.cpp
  45.     $(CXX) $*.cpp  $(CFLAGS) -c
  46.  
  47. testlibshared  : clean testlib.cpp library
  48.     $(CXX) testlib.cpp -g -Wall -L. -lGeom2D -o testlibshared
  49.  
  50. testliblinked : clean testlib.cpp $(OBJS)
  51.     $(CXX) testlib.cpp -g -Wall $(OBJS) -o testliblinked
  52.  
  53. testlibstatic : clean testlib.cpp $(OBJS)
  54.     $(CXX) testlib.cpp -g -static -Wall $(OBJS) -o testlibstatic
  55.  
  56. testarc : testarc.cpp arc.o point.o geom.o circle.o
  57.     $(CXX) testarc.cpp arc.o point.o geom.o circle.o $(CFLAGS) -o testarc 
  58.  
  59.  
  60. clean : 
  61.     rm -f *.o testlibstatic testlibshared testliblinked testlib testarc libGeom2D.so.* 
  62.  
  63. vimclean: clean
  64.     rm -f *~
  65.