home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Educational / RasMol / Source / makefile < prev    next >
Encoding:
Makefile  |  1995-10-24  |  1.8 KB  |  81 lines

  1.  
  2. #
  3. #    RasMol makefile for NEXTSTEP systems.
  4. #        (c) 1995 Andreas Windemuth
  5. #
  6. #  "make" builds the rasmol library for linking to RasMol.app
  7. #  "make test" builds and runs a command line version with no graphics
  8.  
  9. .SUFFIXES: .m .c .o
  10.  
  11.  
  12. CC = cc
  13. OPT=-g -O
  14. #ARCH=-arch m68k -arch i486
  15. CMOD=-DAPP
  16. CFLAGS=$(ARCH) $(OPT) -I. -DNEXT $(CMOD)
  17.  
  18. DEPTHDEF = -DEIGHTBIT
  19. RASMOLDIR = /usr/local/lib/rasmol/
  20. DEFINES = -DRASMOLDIR=\"$(RASMOLDIR)\" $(DEPTHDEF)
  21.  
  22.  
  23. MAIN=rasmol
  24.  
  25. CFILES = $(MAIN).c molecule.c abstree.c command.c \
  26.     transfor.c render.c pixutils.c outfile.c script.c infile.c repres.c
  27.  
  28. MFILES = rasnext.m
  29.  
  30. OFILES =$(MFILES:.m=.o) $(CFILES:.c=.o)
  31.  
  32. LIBS=-lNeXT_s
  33.  
  34. librasmol.a lib: $(OFILES)
  35. #    ar rc librasmol.a $(OFILES)
  36. #    ranlib librasmol.a
  37.     libtool -o librasmol.a $(OFILES)
  38.  
  39. test:
  40.     make CMOD="" rasmol
  41.     rasmol data/1crn.pdb
  42.  
  43. rasmol: $(OFILES)
  44.     $(CC) $(CFLAGS) -o rasmol $(OFILES) $(LIBS)
  45.  
  46. .c.o:
  47.     $(CC) $(CFLAGS) -c $*.c
  48.  
  49. .m.o:
  50.     $(CC) $(CFLAGS) -c $*.m
  51.  
  52. SOURCES=makefile makefile.next make.depend *.h $(MFILES) $(CFILES)
  53.  
  54. tar:
  55.     (cd ..; tar cvf - `cd rasmol; make tarlist`) | gzip > rasmol.tar.gz
  56.  
  57. tarlist:
  58.     @ls $(SOURCES) | sed 's|^\(.*\)$$|rasmol/\1|'
  59.     @cd rasnext; make tarlist | sed 's|^\(.*\)$$|rasmol/\1|'
  60.  
  61. clean:
  62.     rm -f *.o rasmol_test librasmol.a
  63.  
  64. depend:
  65.     $(CC) -MM $(MFILES) $(CFILES) > make.depend
  66.  
  67. include make.depend
  68.  
  69. DEPTHDEF = -DEIGHTBIT
  70. RASMOLDIR = /usr/local/lib/rasmol/
  71. DEFINES = -DRASMOLDIR=\"$(RASMOLDIR)\" $(DEPTHDEF)
  72.  
  73. SRCS = rasmol.c rasmol.h molecule.c molecule.h abstree.c abstree.h \
  74.        command.c command.h tokens.h transfor.c transfor.h render.c render.h \
  75.        x11win.c graphics.h pixutils.c pixutils.h font.h outfile.c outfile.h \
  76.        script.c script.h
  77.  
  78. OBJS = rasmol.o molecule.o abstree.o command.o transfor.o render.o x11win.o \
  79.        pixutils.o outfile.o script.o
  80.  
  81.