######################################################################## # Sample ALBERTA Makefile for DIM_OF_WORLD = 3 # ######################################################################## .PHONY: all PROGS = ellipt-klein-bottle ellipt-torus ellipt-sphere all: $(PROGS) DEFAULT = ellipt prefix = @prefix@ exec_prefix = @exec_prefix@ # delete line, if the paths are environment variables ALBERTA_INCLUDE_PATH = @includedir@/@PACKAGE@ ALBERTA_LIB_PATH = @libdir@ ALBERTA_LIBEXEC_PATH = @pkglibexecdir@ # compile flags # # run make with "make DEBUG=1" to get debuggable code # ifeq ($(DEBUG),1) CFLAGS = @ALBERTA_DEBUG_CFLAGS@ @CFLAGS@ ALBERTA_DEBUG = 1 else CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ @CFLAGS@ ALBERTA_DEBUG = 0 endif FFLAGS = @FFLAGS@ # link flags (use "-shared" or "-static" to specify ALBERTA library type) # Default type is "-shared", if the configuration permits it. # Use "-all-static" to create a standalone, truly static binary. LDFLAGS = @LDFLAGS@ # uncomment line for using the debug library #DEBUG = 1 include $(ALBERTA_LIBEXEC_PATH)/Makefile.alberta ######################################################################## # DFLAGS: DIM_OF_WORLD ######################################################################## DIM_OF_WORLD = 4 ######################################################################## # set virtual path ######################################################################## VPATH = ./:../Common ######################################################################## # and now the user's files ######################################################################## # small support library for graphics and command-line parsing libdemo.a: libdemo.a(cmdline.o geomview-graphics.o) @RANLIB@ $@ libdemo.a(cmdline.o geomview-graphics.o): alberta-demo.h # unorientable 2d surface embedded into 4d ELLIPT_KLEIN_BOTTLE_OFILES = ellipt-klein-bottle.o libdemo.a ellipt-klein-bottle: \ $(ELLIPT_KLEIN_BOTTLE_OFILES) $(ALBERTA_INCLUDE_PATH)/alberta.h $(LINK) $(ELLIPT_KLEIN_BOTTLE_OFILES) $(LIBS) # embedded S^3 \subset \R^4 ELLIPT_SPHERE_OFILES = ellipt-sphere.o libdemo.a ellipt-sphere: $(ELLIPT_SPHERE_OFILES) $(ALBERTA_INCLUDE_PATH)/alberta.h $(LINK) $(ELLIPT_SPHERE_OFILES) $(LIBS) # embedded T^3 \subset \R^4 ELLIPT_TORUS_OFILES = ellipt-torus.o libdemo.a ellipt-torus: $(ELLIPT_TORUS_OFILES) $(LINK) $(ELLIPT_TORUS_OFILES) $(LIBS) ################################################################################ .PHONY: clean realclean new clean: albertaclean -rm -f $(PROGS) libdemo.a realclean: clean albertarealclean new: albertanew