# Makefile tail for MapSlicer command library and CCP4mapwish interpreter. # This will be modified by configure. # $Id$ # variables which should be set by configure: libdir, incdir, CC, CFLAGS, # FC, FFLAGS, SYSLIBS, INSTALL_PROGRAM SHELL = /bin/sh # how to add a member to an archive (second and first args # respectively); this might need to be set by configure: AR = ar r # Where to find library.h srcdir = $(top_srcdir)/src/ccp4mapwish_ incdir = $(top_srcdir)/include LIB_DIR = ../../lib# where to pick up libccp4 # Source directory and objects cdir = $(srcdir) cobjs = ccp4mapwish_init.o ccp4mapwish_tcl.o ccp4mapwish_map.o ccp4mapwish_canvas.o \ ccp4mapwish_section.o ccp4mapwish_contour.o c_contour.o ccp4mapwish_utils.o # How to link against the Tcl and Tk libraries TCLLDFLAGS= $(TK_LIB_SPEC) $(TCL_LIB_SPEC) # Targets all : $(MAPSLICER_TARGETS) ccp4mapwish : $(cobjs) ccp4mapwish_main.o rm -f ccp4mapwish; $(CC) $(CFLAGS) -o ccp4mapwish ccp4mapwish_main.o \ $(cobjs) $(LDCFLAGS) $(TCLLDFLAGS) $(TK_LIBS) libccp4map.a : $(cobjs) rm -f libccp4map.a $(AR) libccp4map.a $(cobjs) libccp4map.so : libccp4map.a rm -f libccp4map.so $(MAPSLICER_SHARE) # Explicit building of the real targets $(cobjs) ccp4mapwish_main.o : # dependencies below $(CC) -I$(incdir) -I$(tclinc) $(TK_XINCLUDES) $(CFLAGS) \ $(MAPSLICER_XCFLAGS) -c -o $@ $(cdir)/`basename $@ .o`.c ccp4mapwish_main.o : $(cdir)/ccp4mapwish_main.c $(cdir)/ccp4mapwish.h ccp4mapwish_init.o : $(cdir)/ccp4mapwish_init.c $(cdir)/ccp4mapwish.h ccp4mapwish_tcl.o : $(cdir)/ccp4mapwish_tcl.c $(cdir)/ccp4mapwish.h ccp4mapwish_map.o : $(cdir)/ccp4mapwish_map.c $(cdir)/ccp4mapwish.h ccp4mapwish_canvas.o : $(cdir)/ccp4mapwish_canvas.c $(cdir)/ccp4mapwish.h ccp4mapwish_section.o : $(cdir)/ccp4mapwish_section.c $(cdir)/ccp4mapwish.h ccp4mapwish_utils.o : $(cdir)/ccp4mapwish_utils.c $(cdir)/ccp4mapwish.h ccp4mapwish_contour.o : $(cdir)/ccp4mapwish_contour.c $(cdir)/ccp4mapwish.h \ $(cdir)/c_contour.h c_contour.o : $(cdir)/c_contour.c $(cdir)/c_contour.h # # standard targets # # Install install : all $(INSTALL_PROGRAM) ccp4mapwish $(bindir)/ccp4mapwish test -f `pwd`/libccp4map.a && $(INSTALL_DATA) `pwd`/libccp4map.a \ $(libdir)/libccp4map.a || true test -f `pwd`/libccp4map.so && $(INSTALL_DATA) `pwd`/libccp4map.so \ $(libdir)/libccp4map.so || true # Clean clean : -rm -f *.o *~ core # Realclean realclean : clean -rm -f libccp4map.a libccp4map.so ccp4mapwish # Distclean distclean : realclean -rm -f Makefile # Uninstall uninstall : -rm -f $(bindir)/ccp4mapwish $(libdir)/libccp4map.a $(libdir)/libccp4map.so # End: