1
--- Makefile.old 2006-05-26 21:05:42.000000000 +0100
2
+++ Makefile 2006-07-18 21:36:14.359375000 +0100
5
CXXFLAGS = -O3 -Wall -W
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
13
+# uncomment the following in order to create native win32
14
+# binaries and/or libraries under cygwin --lfcastro
15
+CXXFLAGS += -mno-cygwin
17
+LIBOBJS = $(LIBSRCS:.cc=.o)
19
+LIBNAME = smodels.dll
23
+LFLAGS += -Wl,--out-implib=$(LIBNAME:.dll=.a)
24
+LFLAGS += -Wl,--output-def=$(LIBNAME:.dll=.def)
26
+# use the following otherwise --lfcastro
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
35
+# LDOPTS = -rpath $(LIBPATH)
38
- $(CXX) $(LFLAGS) -o smodels $(OBJS)
39
+ $(CXX) $(LFLAGS) -o $(NAME) $(OBJS)
42
$(CXX) $(CXXFLAGS) -c $<
44
.PHONY: lib libinstall clean all build binary install
46
-LIBPATH = /usr/local/lib
47
-LIBOBJS = $(LIBSRCS:.cc=.lo)
49
# Make a shared library
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)
57
- libtool --mode=compile --tag=CXX $(CXX) $(CXXFLAGS) -c $<
58
+ $(LIBTOOL) $(LCMODES) $(CXX) $(CXXFLAGS) -c $<
61
- libtool install -c libsmodels.la $(LIBPATH)/libsmodels.la
62
+ $(LIBTOOL) install -c libsmodels.la $(LIBPATH)/libsmodels.la
65
- rm -f core $(OBJS) $(LIBOBJS) smodels libsmodels.la
66
+ rm -f core $(OBJS) $(LIBOBJS) $(NAME) $(LIBNAME)