~burner/xsb/debianized-xsb

« back to all changes in this revision

Viewing changes to packages/xasp/patch-smodels-2.31

  • Committer: Michael R. Head
  • Date: 2006-09-06 22:11:55 UTC
  • Revision ID: burner@n23-20060906221155-7e398d23438a7ee4
Add the files from the 3.0.1 release package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- Makefile.old        2006-05-26 21:05:42.000000000 +0100
 
2
+++ Makefile    2006-07-18 21:36:14.359375000 +0100
 
3
@@ -1,36 +1,57 @@
 
4
 CXX = g++
 
5
 CXXFLAGS = -O3 -Wall -W
 
6
-LFLAGS =
 
7
 LIBSRCS = smodels.cc stack.cc dcl.cc atomrule.cc read.cc \
 
8
 queue.cc timer.cc list.cc improve.cc program.cc api.cc stable.cc \
 
9
 tree.cc denant.cc restart.cc
 
10
 SRCS = $(LIBSRCS) main.cc
 
11
 OBJS = $(SRCS:.cc=.o)
 
12
 
 
13
+# uncomment the following in order to create native win32
 
14
+# binaries and/or libraries under cygwin  --lfcastro
 
15
+CXXFLAGS += -mno-cygwin
 
16
+LIBTOOL = 
 
17
+LIBOBJS = $(LIBSRCS:.cc=.o)
 
18
+NAME = smodels.exe
 
19
+LIBNAME = smodels.dll
 
20
+LDMODES = 
 
21
+LCMODES = 
 
22
+LFLAGS = -mno-cygwin
 
23
+LFLAGS += -Wl,--out-implib=$(LIBNAME:.dll=.a)
 
24
+LFLAGS += -Wl,--output-def=$(LIBNAME:.dll=.def)
 
25
+LDOPTS = -shared
 
26
+# use the following otherwise --lfcastro
 
27
+# LIBTOOL = libtool
 
28
+# NAME = smodels
 
29
+# LIBOBJS = $(LIBSRCS:.cc=.lo)
 
30
+# LIBNAME = libsmodels.la
 
31
+# LIBPATH = /usr/local/lib
 
32
+# LDMODES = --mode=link --tag=CXX
 
33
+# LCMODES = --mode=compile --tag=CXX
 
34
+# LFLAGS = 
 
35
+# LDOPTS = -rpath $(LIBPATH)
 
36
+
 
37
 smodels: $(OBJS)
 
38
-       $(CXX) $(LFLAGS) -o smodels $(OBJS)
 
39
+       $(CXX) $(LFLAGS) -o $(NAME) $(OBJS)
 
40
 
 
41
 %.o: %.cc
 
42
        $(CXX) $(CXXFLAGS) -c $<
 
43
 
 
44
 .PHONY: lib libinstall clean all build binary install
 
45
 
 
46
-LIBPATH = /usr/local/lib
 
47
-LIBOBJS = $(LIBSRCS:.cc=.lo)
 
48
 
 
49
 # Make a shared library
 
50
 lib: $(LIBOBJS)
 
51
-       libtool --mode=link --tag=CXX $(CXX) $(LFLAGS) -o libsmodels.la \
 
52
-               $(LIBOBJS) -rpath $(LIBPATH)
 
53
+       $(LIBTOOL) $(LDMODES) $(CXX) $(LFLAGS) -o $(LIBNAME) \
 
54
+               $(LIBOBJS) $(LDOPTS)
 
55
 
 
56
 %.lo: %.cc
 
57
-       libtool --mode=compile --tag=CXX $(CXX) $(CXXFLAGS) -c $<
 
58
+       $(LIBTOOL) $(LCMODES) $(CXX) $(CXXFLAGS) -c $<
 
59
 
 
60
 libinstall:
 
61
-       libtool install -c libsmodels.la $(LIBPATH)/libsmodels.la
 
62
+       $(LIBTOOL) install -c libsmodels.la $(LIBPATH)/libsmodels.la
 
63
 
 
64
 clean:
 
65
-       rm -f core $(OBJS) $(LIBOBJS) smodels libsmodels.la
 
66
+       rm -f core $(OBJS) $(LIBOBJS) $(NAME) $(LIBNAME)
 
67
 
 
68
 all:
 
69
        $(MAKE) clean smodels