Mercurial > hg > plcrp
view Makefile @ 3:974d7be8eec4 tip
Update to pack-based dcg utilities
author | samer |
---|---|
date | Tue, 03 Oct 2017 11:52:23 +0100 |
parents | ed130acab5f1 |
children |
line wrap: on
line source
# install directories export INSTALL_LIB_TO=~/lib/prolog/x86_64 export INSTALL_PL_TO=~/lib/prolog # flags for install - BSD install seems to be different from GNU install export INSTALL_FLAGS='-bCS' SO=dylib TARGET=crp.$(SO) PLLD=swipl-ld GSL=/opt/local HAVE_GSL=1 ifeq ($(HAVE_GSL),1) PLLDFLAGS=-DHAVE_GSL=1 -I$(GSL)/include -L$(GSL)/lib -lgsl -lm -fPIC -Wall -O2 else PLLDFLAGS=-DHAVE_GSL=0 -lm -fPIC -Wall -O2 endif .SUFFIXES: .c .o .so .dylib main: $(TARGET) RngStream.o rndutils.o $(TARGET): crp.c RngStream.o rndutils.o clean: rm $(TARGET) RngStream.o rndutils.o .c.o: $(PLLD) -v $(PLLDFLAGS) -c $< .c.so: $(PLLD) -v $(PLLDFLAGS) -shared -o $@ RngStream.o rndutils.o $< strip -x $@ .c.dylib: $(PLLD) -v $(PLLDFLAGS) -shared -o $@ RngStream.o rndutils.o $< strip -x $@ install: main install -d $(INSTALL_PL_TO)/propr install $(INSTALL_FLAGS) $(TARGET) $(INSTALL_LIB_TO) install $(INSTALL_FLAGS) -m 644 crp.pl $(INSTALL_PL_TO)/propr