# # Makefile for Pico piglatin extension demo # Rick Ratzel # 3/8/2004 # # Copyright (c) 2004 Richard L. Ratzel # see file "COPYRIGHT" for more details... # # # 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@ # # 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@ @LIBS@ ELMER = @ELMER@ CFLAGS = @CFLAGS@ CC_SWITCHES = $(CFLAGS) $(INCLUDES) ifdef frozen ELMER_FLAGS = -frozen ELMER_DEPS = ../configfile/configfile.elm ../configfile/configfile.py else ELMER_FLAGS = -warm ELMER_DEPS = ../configfile/configfile.elm endif CFPrinter: libconfigfile.a CFPrinter.cpp $(CXX) -I. -o CFPrinter CFPrinter.cpp libconfigfile.a $(LIBS) libconfigfile.a: configfile.o configfile_cpp.o ifdef frozen $(AR) -rcv $@ configfile.o configfile_cpp.o M_*.o else $(AR) -rcv $@ configfile.o configfile_cpp.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 configfile_cpp.o: configfile_cpp.cpp $(CXX) -c $(CC_SWITCHES) $< clean: rm -f libconfigfile.a configfile.o configfile.c configfile.h configfile_cpp.o CFPrinter M_*