2008-12-22 12:02:22 +00:00
|
|
|
#
|
|
|
|
# default base directory for YAP installation
|
|
|
|
# (EROOT for architecture-dependent files)
|
|
|
|
#
|
|
|
|
GCC=@GCC@
|
|
|
|
prefix = @prefix@
|
2010-03-05 10:22:48 +00:00
|
|
|
exec_prefix = @exec_prefix@
|
2008-12-22 12:02:22 +00:00
|
|
|
ROOTDIR = $(prefix)
|
|
|
|
EROOTDIR = @exec_prefix@
|
2009-05-02 20:11:54 +01:00
|
|
|
abs_top_builddir = @abs_top_builddir@
|
2008-12-22 12:02:22 +00:00
|
|
|
#
|
|
|
|
# where the binary should be
|
|
|
|
#
|
|
|
|
BINDIR = $(EROOTDIR)/bin
|
|
|
|
#
|
|
|
|
# where YAP should look for libraries
|
|
|
|
#
|
2010-06-01 00:38:42 +01:00
|
|
|
LIBDIR=@libdir@
|
|
|
|
YAPLIBDIR=@libdir@/Yap
|
2008-12-22 12:02:22 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
CC=@CC@
|
2010-06-21 11:54:21 +01:00
|
|
|
CFLAGS= @SHLIB_CFLAGS@ $(YAP_EXTRAS) $(DEFS) -D_YAP_NOT_INSTALLED_=1 -I$(srcdir) -I../.. -I$(srcdir)/../../include @CPPFLAGS@
|
2008-12-22 12:02:22 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
# You shouldn't need to change what follows.
|
|
|
|
#
|
|
|
|
INSTALL=@INSTALL@
|
|
|
|
INSTALL_DATA=@INSTALL_DATA@
|
|
|
|
INSTALL_PROGRAM=@INSTALL_PROGRAM@
|
|
|
|
SHELL=/bin/sh
|
|
|
|
RANLIB=@RANLIB@
|
|
|
|
srcdir=@srcdir@
|
2010-06-14 10:36:13 +01:00
|
|
|
SO=@SO@
|
2008-12-22 12:02:22 +00:00
|
|
|
#4.1VPATH=@srcdir@:@srcdir@/OPTYap
|
|
|
|
CWD=$(PWD)
|
|
|
|
#
|
|
|
|
|
|
|
|
HEADERS=$(srcdir)/atoms.h $(srcdir)/pl-buffer.h $(srcdir)/pl-ctype.h \
|
2009-04-20 22:22:47 +01:00
|
|
|
$(srcdir)/pl-incl.h \
|
|
|
|
$(srcdir)/pl-mswchar.h \
|
|
|
|
$(srcdir)/pl-opts.h \
|
2008-12-22 12:02:22 +00:00
|
|
|
$(srcdir)/pl-os.h \
|
2009-06-01 22:43:27 +01:00
|
|
|
$(srcdir)/pl-privitf.h \
|
2008-12-22 12:02:22 +00:00
|
|
|
$(srcdir)/pl-stream.h \
|
|
|
|
$(srcdir)/pl-table.h \
|
|
|
|
$(srcdir)/pl-text.h $(srcdir)/pl-utf8.h \
|
2009-07-21 04:56:16 +01:00
|
|
|
$(srcdir)/pl-yap.h @ENABLE_WINCONSOLE@ $(srcdir)/uxnt/dirent.h $(srcdir)/uxnt/utf8.h $(srcdir)/pl-utf8.c $(srcdir)/uxnt/uxnt.h
|
2008-12-22 12:02:22 +00:00
|
|
|
C_SOURCES=$(srcdir)/pl-buffer.c $(srcdir)/pl-ctype.c \
|
2010-02-22 09:35:47 +00:00
|
|
|
$(srcdir)/pl-error.c \
|
2010-05-04 15:17:08 +01:00
|
|
|
$(srcdir)/pl-file.c $(srcdir)/pl-files.c \
|
|
|
|
$(srcdir)/pl-glob.c \
|
|
|
|
$(srcdir)/pl-os.c \
|
2009-06-01 22:43:27 +01:00
|
|
|
$(srcdir)/pl-privitf.c \
|
2008-12-22 12:02:22 +00:00
|
|
|
$(srcdir)/pl-stream.c $(srcdir)/pl-string.c \
|
|
|
|
$(srcdir)/pl-table.c \
|
2009-07-21 04:56:16 +01:00
|
|
|
$(srcdir)/pl-text.c \
|
2010-05-04 15:17:08 +01:00
|
|
|
$(srcdir)/pl-util.c \
|
2009-07-21 04:56:16 +01:00
|
|
|
$(srcdir)/pl-yap.c @ENABLE_WINCONSOLE@ $(srcdir)/popen.c $(srcdir)/uxnt/uxnt.c
|
2010-02-22 09:35:47 +00:00
|
|
|
OBJS=pl-buffer.o pl-ctype.o pl-error.o \
|
2010-05-04 15:17:08 +01:00
|
|
|
pl-file.o pl-files.o pl-glob.o pl-os.o pl-privitf.o \
|
2009-11-23 13:41:07 +00:00
|
|
|
pl-stream.o pl-string.o pl-table.o \
|
2010-05-04 15:17:08 +01:00
|
|
|
pl-text.o pl-util.o pl-utf8.o \
|
2009-07-21 04:56:16 +01:00
|
|
|
pl-yap.o @ENABLE_WINCONSOLE@ uxnt.o
|
2010-06-14 10:36:13 +01:00
|
|
|
SOBJS=libplstream.@SO@
|
2008-12-22 12:02:22 +00:00
|
|
|
|
|
|
|
#in some systems we just create a single object, in others we need to
|
|
|
|
# create a libray
|
|
|
|
|
|
|
|
all: $(SOBJS)
|
|
|
|
|
2009-04-20 22:22:47 +01:00
|
|
|
uxnt.o: $(srcdir)/uxnt/uxnt.c
|
2010-06-21 11:54:21 +01:00
|
|
|
$(CC) -c $(CFLAGS) $(srcdir)/uxnt/uxnt.c -o uxnt.o
|
2009-04-20 22:22:47 +01:00
|
|
|
|
2009-05-02 18:33:36 +01:00
|
|
|
# default rule
|
2009-05-02 19:22:47 +01:00
|
|
|
%.o : $(srcdir)/%.c
|
2010-06-21 11:54:21 +01:00
|
|
|
$(CC) -c $(CFLAGS) $< -o $@
|
2009-05-02 18:33:36 +01:00
|
|
|
|
2010-06-14 10:36:13 +01:00
|
|
|
@DO_SECOND_LD@%.@SO@: %.o
|
2010-06-01 00:38:42 +01:00
|
|
|
@DO_SECOND_LD@ @SHLIB_LD@ -o $@ $< @EXTRA_LIBS_FOR_DLLS@
|
2008-12-22 12:02:22 +00:00
|
|
|
|
2010-06-14 10:36:13 +01:00
|
|
|
@DO_SECOND_LD@libplstream.@SO@: $(OBJS)
|
|
|
|
@DO_SECOND_LD@ @SHLIB_LD@ -o libplstream.@SO@ $(OBJS) @EXTRA_LIBS_FOR_DLLS@
|
2008-12-22 12:02:22 +00:00
|
|
|
|
|
|
|
install: all
|
2010-06-01 00:38:42 +01:00
|
|
|
$(INSTALL_PROGRAM) $(SOBJS) $(DESTDIR)$(YAPLIBDIR)
|
2008-12-22 12:02:22 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o *~ $(OBJS) $(SOBJS) *.BAK
|
|
|
|
|
|
|
|
|
|
|
|
depend: $(HEADERS) $(C_SOURCES)
|
|
|
|
-@if test "$(GCC)" = yes; then\
|
2009-04-23 03:22:04 +01:00
|
|
|
$(CC) -MM -MG $(CFLAGS) -I$(srcdir) -I$(srcdir)/../../include -I$(srcdir)/../../H $(C_SOURCES) >> Makefile;\
|
2008-12-22 12:02:22 +00:00
|
|
|
else\
|
|
|
|
makedepend -f - -- $(CFLAGS) -I$(srcdir)/../../H -I$(srcdir)/../../include -- $(C_SOURCES) |\
|
2009-04-23 03:22:04 +01:00
|
|
|
sed 's|.*/\([^:]*\):|\1:|' >> Makefile ;\
|
2008-12-22 12:02:22 +00:00
|
|
|
fi
|
2009-05-02 18:33:36 +01:00
|
|
|
|
|
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
|
|
|
|