home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / math / lpsolves / makefile < prev    next >
Encoding:
Makefile  |  1993-07-28  |  1.3 KB  |  65 lines

  1. MYSOURCES= main.c solve.c read.c write.c tran.c dual.c
  2. YSOURCE= y.tab.c
  3. YOBJECT= ${YSOURCE:.c=.o}
  4. LSOURCE= lex.yy.c
  5. OBJECTS= ${MYSOURCES:.c=.o} ${YOBJECT}
  6. INCLUDES= globals.h defines.h proto.h
  7. TARGET= lp_solve
  8. MANPAGE= ${TARGET}.1
  9.  
  10. # -ll and -lm seems to be enough on most machines.
  11. LIBS= -ll -lm
  12.  
  13. # change this when you like. They are only used with make install.
  14. INSTALLDIR=~/bin
  15. MANDIR=~/man/man1
  16.  
  17. # for performance reasons be sure to add all possible floating point support
  18. # This is ANSI C code following POSIX standards, be sure to tell your compiler
  19. # when necessary.
  20. # default
  21. CFLAGS= -O
  22. #Apollo 68040 based: 425[est], DN5500
  23. #CFLAGS= -O -Acpu,mathlib
  24. #Apollo 680[23]0 based: DN[234]XXX
  25. #CFLAGS= -O -Acpu,mathchip
  26. # debugging
  27. #CFLAGS= -g
  28.  
  29. # choose a C compiler. On Sun, you probably want to use gcc
  30. CC= gcc
  31.  
  32. ${TARGET} : ${OBJECTS} 
  33.     ${CC} -o ${TARGET} ${CFLAGS} ${OBJECTS} ${LIBS}
  34.  
  35. ${OBJECTS} : ${INCLUDES}
  36.  
  37. main.o : patchlevel.h
  38.  
  39.  
  40. ${LSOURCE} : lex.l
  41.     lex lex.l
  42.  
  43. ${YSOURCE} : lp.y
  44.     yacc lp.y
  45.  
  46. ${YOBJECT} : ${LSOURCE}
  47.  
  48. install:
  49.     cp ${TARGET} ${INSTALLDIR}
  50.     cp ${MANPAGE} ${MANDIR}
  51.  
  52. clean:
  53.     /bin/rm -f ${OBJECTS} ${TARGET} TAGS ${LSOURCE}  ${YSOURCE}
  54.  
  55. # the following definitions can be practical if you have the tools
  56.  
  57. TAGS:
  58.     etags *.[chly]
  59.  
  60. proto.h:
  61.     mkproto ${MYSOURCES} > proto.h
  62.  
  63. ${TARGET}.man: ${MANPAGE}
  64.     nroff -man ${MANPAGE} > ${TARGET}.man
  65.