# # Makefile for Pico piglatin extension demo # Rick Ratzel # 3/2/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@ ELMER = @ELMER@ CFLAGS = @CFLAGS@ CC_SWITCHES = $(CFLAGS) $(INCLUDES) ifdef frozen ELMER_FLAGS = -frozen else ELMER_FLAGS = -warm endif pico: picoSrc/pico cp picoSrc/pico . picoSrc/pico: libpiglatin.a (cd picoSrc; $(MAKE)) libpiglatin.a: piglatin.o ifdef frozen $(AR) -rcv $@ $< M_*.o else $(AR) -rcv $@ $< endif piglatin.o: piglatin.c $(CC) -c $(CC_SWITCHES) $< ifdef frozen $(CC) -c M_*.c endif piglatin.c: piglatin.elm piglatin.py $(ELMER) $(ELMER_FLAGS) -int $< piglatin.py clean: rm -f libpiglatin.a piglatin.o piglatin.c piglatin.h pico M_* scrub: clean (cd picoSrc; $(MAKE) clean)