srcdir= ./ tstdir= ./tests platform= unix builddir= ../../build_$(platform) ################################################## # Paths for standard user-level commands. ################################################## SHELL= @db_cv_path_sh@ rm= @db_cv_path_rm@ ################################################## # General library information. ################################################## LIBTOOL= $(SHELL) $(builddir)/libtool POSTLINK= @POSTLINK@ LIBMAJOR= @DBSQL_VERSION_MAJOR@ LIBVERSION= @DBSQL_VERSION_MAJOR@.@DBSQL_VERSION_MINOR@ DBSQL_LIB= dbsql-$(LIBVERSION) ################################################## # C API. ################################################## CFLAGS= -c $(CPPFLAGS) @CFLAGS@ CC= @MAKEFILE_CC@ CCLINK= @MAKEFILE_CCLINK@ LDFLAGS= @LDFLAGS@ @TCL_LD_FLAGS@ LIBS= @LIBS@ @TCL_LIBS@ @TCL_LIB_SPEC@ @LIBSO_LIBS@ CPPFLAGS= -I$(builddir) -I$(srcdir) -I../../src \ @TCL_CFLAGS@ \ @CPPFLAGS@ ################################################## # Source file lists. ################################################## TCL_FILES=\ $(scrdir)/tcl_md5.c TCL_OBJS=\ tcl_md5@o@ ################################################## # Note: "all" must be the first target in the Makefile. ################################################## all: dbsql_tclsh ################################################## # Utilities ################################################## dbsql_tclsh: $(TCL_OBJS) dbsql_tclsh@o@ $(CCLINK) -o $@ $(LDFLAGS) $(TCL_OBJS) dbsql_tclsh@o@ \ -L$(builddir) -l$(DBSQL_LIB) $(LIBS) $(POSTLINK) $@ ################################################## # Testing. ################################################## test: dbsql_tclsh ./dbsql_tclsh $(tstdir)/quick.test ################################################## # Remaining standard Makefile targets. ################################################## CLEAN_LIST=\ dbsql_tclsh mostly-clean clean: $(rm) -rf $(C_OBJS) $(rm) -rf $(TCL_OBJS) $(rm) -rf dbsql_tclsh $(rm) -rf *.o *.lo *.loT *.la $(rm) -rf test.db test?.db test.db-journal test.tcl test1.bt data?.txt REALCLEAN_LIST=\ Makefile ################################################## # Build rules. ################################################## dbsql_tclsh@o@: $(srcdir)/dbsql_tclsh.c $(CC) $(CFLAGS) $? tcl_md5@o@: $(srcdir)/tcl_md5.c $(CC) $(CFLAGS) $?