-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.temp
65 lines (52 loc) · 1.42 KB
/
Makefile.temp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
SHELL := /bin/bash
#LIBDIR=lib/$(SWIARCH)/
LIBDIR=lib/$(SWIARCH)/
#
#
CC=gcc
INC1=cudd-3.0.0/cudd
CURRDIR=$(shell pwd)
#INC2=$(shell while read one two three; \
#do TEMP=$two; \
#done <<< `whereis swipl`; \
#readlink -f $TEMP; \
)/include #da completare
INC2=${SWIHOME}/include
#INC2=`echo /usr/lib/swi*`/include/
INCDIRS= -I$(INC1)
CFLAGSBDDEM= $(CFLAGS) -fPIC -DBP_FREE -O3 -fomit-frame-pointer -Wall -g -O2 ${INCDIRS}
#
#
# You shouldn't need to change what follows.
#
LDFLAGS= $(LDSOFLAGS) -shared -Lcudd-3.0.0/cudd/.libs/ -lcudd
#cudd-3.0.0/cudd/.libs/libcudd-3.0.0.so.0.0.0
#
all: bddem.$(SOEXT)
bddem.$(SOEXT): bddem.o
#swipl-ld -export-dynamic bddem.o $(LDFLAGS) -o bddem.$(SOEXT)
if test $(SWIARCH) == x64-win64 -o $(SWIARCH) == i386-win32 ; then \
$(CC) bddem.o -static-libgcc -static-libstdc++ $(LDFLAGS) -lswipl -o bddem.$(SOEXT) ;\
else \
if [[ $(SWIARCH) == *darwin* ]] ; then \
$(CC) bddem.o $(LDFLAGS) -lswipl -o bddem.$(SOEXT) ;\
else \
$(CC) -export-dynamic bddem.o $(LDFLAGS) -o bddem.$(SOEXT) ;\
fi \
fi
#-Wl,-R,$(YAPLIBDIR) -Wl,-R,$(LIBDIR)
bddem.o : bddem.c
cd cudd-3.0.0 && $(MAKE) && cd ..
$(CC) -c $(CFLAGSBDDEM) bddem.c -o bddem.o
distclean: clean
rm Makefile
cd cudd-3.0.0 && $(MAKE) distclean && cd ..
clean:
rm -f *.o bddem.$(SOEXT)
check:
@echo "no check"
install: all
mkdir -p $(LIBDIR)
cp bddem.$(SOEXT) $(LIBDIR)
installcheck:
swipl -g test -t halt prolog/bddem_test.pl