Generalized

This commit is contained in:
Justin Ethier 2016-04-01 00:30:51 -04:00
parent a01750ac16
commit f6de774b9c

View file

@ -1,8 +1,24 @@
# Automated building of a program
#
# Just put the main program and libraries at the top here
# without extensions, and the makefile takes care of
# everything else:
SCM_PROGRAM = life
SCM_LIBS = example/grid example/life
all: SLD_FILES = $(addsuffix .sld, $(SCM_LIBS))
cyclone example/grid.sld SCM_FILE = $(addsuffix .scm, $(SCM_PROGRAM))
cyclone example/life.sld META_FILES = $(addsuffix .meta, $(SCM_LIBS))
cyclone life.scm GENC_FILES = $(addsuffix .c, $(SCM_LIBS))
COBJECTS=$(SLD_FILES:.sld=.o)
all: $(SCM_PROGRAM)
%.o: %.sld
cyclone $<
$(SCM_PROGRAM): $(SCM_FILE) $(COBJECTS)
cyclone $<
clean: clean:
rm -f *.o *.c example/*.o example/*.c example/*.meta life rm -f *.o *.c $(SCM_PROGRAM) $(META_FILES) $(GENC_FILES) $(COBJECTS)