# # Makefile for Pico piglatin extension demo # Rick Ratzel # 3/8/2004 # # # location on a RH9 system...use the following in Python to determine # where the Python include dir is # # >>> import distutils.sysconfig # >>> distutils.sysconfig.get_config_var('INCLUDEPY') # INCLUDES = -I. -I@PYTHON_INCLUDES@ -I@ELMER_INCLUDES@ -I@TCL_INCLUDES@ # # locations on a RH9 system...use the following in Python to determine # what other Python libs are needed # ...LIBPL is the directory where the Python library is installed # ...LIBRARY is the name of the Python library # ...SYSLIBS and LIBS are needed for functions in libpython # ...LINKFORSHARED is for linking an embedded interp which uses shared-libs # # >>> import distutils.sysconfig # >>> distutils.sysconfig.get_config_var('LIBPL') # >>> distutils.sysconfig.get_config_var('LIBRARY') # >>> distutils.sysconfig.get_config_var('SYSLIBS') # >>> distutils.sysconfig.get_config_var('LIBS') # >>> distutils.sysconfig.get_config_var('MODLIBS') # >>> distutils.sysconfig.get_config_var('LINKFORSHARED') # LIBS = @PYTHON_LIB_NAME@ @ELMER_LIB_NAME@ @TCL_LIB_NAME@ @LIBS@ ELMER = @ELMER@ CFLAGS = @CFLAGS@ CC_SWITCHES = $(CFLAGS) $(INCLUDES) ifdef frozen ELMER_FLAGS = -tcl -frozen ELMER_DEPS = ../configfile/configfile.elm ../configfile/configfile.py else ELMER_FLAGS = -tcl -warm ELMER_DEPS = ../configfile/configfile.elm endif myTcl: libconfigfile.a myTcl.c $(CC) $(CC_SWITCHES) -o myTcl myTcl.c libconfigfile.a $(LIBS) libconfigfile.a: configfile.o ifdef frozen $(AR) -rcv $@ configfile.o M_*.o else $(AR) -rcv $@ configfile.o endif configfile.o: configfile.c $(CC) -c $(CC_SWITCHES) $< ifdef frozen $(CC) -c M_*.c endif configfile.c: $(ELMER_DEPS) $(ELMER) $(ELMER_FLAGS) -int ../configfile/configfile.elm ../configfile/configfile.py clean: rm -f libconfigfile.a configfile.o configfile.c configfile.h myTcl M_*