removed the containing subdir
This commit is contained in:
38
bin/Makefile.am
Normal file
38
bin/Makefile.am
Normal file
@ -0,0 +1,38 @@
|
||||
AUTOMAKE_OPTIONS = nostdinc
|
||||
|
||||
CPPFLAGS_COMMON = \
|
||||
-I$(abs_builddir) \
|
||||
-I$(abs_builddir)/../lib \
|
||||
-I$(abs_srcdir) \
|
||||
-I$(abs_srcdir)/../lib \
|
||||
-I$(includedir)
|
||||
|
||||
CFLAGS_COMMON =
|
||||
LDFLAGS_COMMON = -L$(abs_builddir)/../lib -L$(libdir)
|
||||
LIBADD_COMMON = ../lib/libmoo.la
|
||||
|
||||
bin_PROGRAMS = moo
|
||||
|
||||
##################################################
|
||||
# moo
|
||||
##################################################
|
||||
moo_SOURCES = main.c
|
||||
moo_CPPFLAGS = $(CPPFLAGS_COMMON)
|
||||
moo_CFLAGS = $(CFLAGS_COMMON)
|
||||
moo_LDFLAGS = $(LDFLAGS_COMMON)
|
||||
moo_LDADD = $(LIBADD_COMMON)
|
||||
|
||||
|
||||
if ENABLE_EXPERIMENTAL
|
||||
|
||||
##################################################
|
||||
# moo-gtk - experimental. the following configuration is temporary only.
|
||||
##################################################
|
||||
bin_PROGRAMS += moo-gtk
|
||||
moo_gtk_SOURCES = gtk-main.c
|
||||
moo_gtk_CPPFLAGS = $(CPPFLAGS_COMMON) -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
|
||||
moo_gtk_CFLAGS = $(CFLAGS_COMMON)
|
||||
moo_gtk_LDFLAGS = $(LDFLAGS_COMMON)
|
||||
moo_gtk_LDADD = $(LIBADD_COMMON) -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0
|
||||
|
||||
endif
|
737
bin/Makefile.in
Normal file
737
bin/Makefile.in
Normal file
@ -0,0 +1,737 @@
|
||||
# Makefile.in generated by automake 1.16.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
bin_PROGRAMS = moo$(EXEEXT) $(am__EXEEXT_1)
|
||||
|
||||
##################################################
|
||||
# moo-gtk - experimental. the following configuration is temporary only.
|
||||
##################################################
|
||||
@ENABLE_EXPERIMENTAL_TRUE@am__append_1 = moo-gtk
|
||||
subdir = bin
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \
|
||||
$(top_srcdir)/m4/ax_numval.m4 $(top_srcdir)/m4/ax_pthread.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/lib/moo-cfg.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
@ENABLE_EXPERIMENTAL_TRUE@am__EXEEXT_1 = moo-gtk$(EXEEXT)
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_moo_OBJECTS = moo-main.$(OBJEXT)
|
||||
moo_OBJECTS = $(am_moo_OBJECTS)
|
||||
moo_DEPENDENCIES = $(LIBADD_COMMON)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
moo_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(moo_CFLAGS) $(CFLAGS) \
|
||||
$(moo_LDFLAGS) $(LDFLAGS) -o $@
|
||||
am__moo_gtk_SOURCES_DIST = gtk-main.c
|
||||
@ENABLE_EXPERIMENTAL_TRUE@am_moo_gtk_OBJECTS = \
|
||||
@ENABLE_EXPERIMENTAL_TRUE@ moo_gtk-gtk-main.$(OBJEXT)
|
||||
moo_gtk_OBJECTS = $(am_moo_gtk_OBJECTS)
|
||||
@ENABLE_EXPERIMENTAL_TRUE@moo_gtk_DEPENDENCIES = $(LIBADD_COMMON)
|
||||
moo_gtk_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(moo_gtk_CFLAGS) \
|
||||
$(CFLAGS) $(moo_gtk_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES =
|
||||
depcomp = $(SHELL) $(top_srcdir)/ac/depcomp
|
||||
am__maybe_remake_depfiles = depfiles
|
||||
am__depfiles_remade = ./$(DEPDIR)/moo-main.Po \
|
||||
./$(DEPDIR)/moo_gtk-gtk-main.Po
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = $(moo_SOURCES) $(moo_gtk_SOURCES)
|
||||
DIST_SOURCES = $(moo_SOURCES) $(am__moo_gtk_SOURCES_DIST)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/ac/depcomp
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_MODE = @BUILD_MODE@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DL_LIBS = @DL_LIBS@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
DYNCALL_LIBS = @DYNCALL_LIBS@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FFI_LIBS = @FFI_LIBS@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBM = @LIBM@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTDL_LIBS = @LTDL_LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MOO_PROJECT_AUTHOR = @MOO_PROJECT_AUTHOR@
|
||||
MOO_PROJECT_URL = @MOO_PROJECT_URL@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
|
||||
PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
|
||||
PACKAGE_VERSION_PATCH = @PACKAGE_VERSION_PATCH@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PTHREAD_CC = @PTHREAD_CC@
|
||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||
QUADMATH_LIBS = @QUADMATH_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SOCKET_LIBS = @SOCKET_LIBS@
|
||||
STRIP = @STRIP@
|
||||
TERMINAL_LIBS = @TERMINAL_LIBS@
|
||||
UNICOWS_LIBS = @UNICOWS_LIBS@
|
||||
UNWIND_LIBS = @UNWIND_LIBS@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
ax_pthread_config = @ax_pthread_config@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = nostdinc
|
||||
CPPFLAGS_COMMON = \
|
||||
-I$(abs_builddir) \
|
||||
-I$(abs_builddir)/../lib \
|
||||
-I$(abs_srcdir) \
|
||||
-I$(abs_srcdir)/../lib \
|
||||
-I$(includedir)
|
||||
|
||||
CFLAGS_COMMON =
|
||||
LDFLAGS_COMMON = -L$(abs_builddir)/../lib -L$(libdir)
|
||||
LIBADD_COMMON = ../lib/libmoo.la
|
||||
|
||||
##################################################
|
||||
# moo
|
||||
##################################################
|
||||
moo_SOURCES = main.c
|
||||
moo_CPPFLAGS = $(CPPFLAGS_COMMON)
|
||||
moo_CFLAGS = $(CFLAGS_COMMON)
|
||||
moo_LDFLAGS = $(LDFLAGS_COMMON)
|
||||
moo_LDADD = $(LIBADD_COMMON)
|
||||
@ENABLE_EXPERIMENTAL_TRUE@moo_gtk_SOURCES = gtk-main.c
|
||||
@ENABLE_EXPERIMENTAL_TRUE@moo_gtk_CPPFLAGS = $(CPPFLAGS_COMMON) -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
|
||||
@ENABLE_EXPERIMENTAL_TRUE@moo_gtk_CFLAGS = $(CFLAGS_COMMON)
|
||||
@ENABLE_EXPERIMENTAL_TRUE@moo_gtk_LDFLAGS = $(LDFLAGS_COMMON)
|
||||
@ENABLE_EXPERIMENTAL_TRUE@moo_gtk_LDADD = $(LIBADD_COMMON) -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign bin/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed 's/$(EXEEXT)$$//' | \
|
||||
while read p p1; do if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then echo "$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n;h' \
|
||||
-e 's|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
|
||||
sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) files[d] = files[d] " " $$1; \
|
||||
else { print "f", $$3 "/" $$4, $$1; } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
|
||||
-e 's/$$/$(EXEEXT)/' \
|
||||
`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(bindir)" && rm -f $$files
|
||||
|
||||
clean-binPROGRAMS:
|
||||
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
|
||||
moo$(EXEEXT): $(moo_OBJECTS) $(moo_DEPENDENCIES) $(EXTRA_moo_DEPENDENCIES)
|
||||
@rm -f moo$(EXEEXT)
|
||||
$(AM_V_CCLD)$(moo_LINK) $(moo_OBJECTS) $(moo_LDADD) $(LIBS)
|
||||
|
||||
moo-gtk$(EXEEXT): $(moo_gtk_OBJECTS) $(moo_gtk_DEPENDENCIES) $(EXTRA_moo_gtk_DEPENDENCIES)
|
||||
@rm -f moo-gtk$(EXEEXT)
|
||||
$(AM_V_CCLD)$(moo_gtk_LINK) $(moo_gtk_OBJECTS) $(moo_gtk_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moo-main.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moo_gtk-gtk-main.Po@am__quote@ # am--include-marker
|
||||
|
||||
$(am__depfiles_remade):
|
||||
@$(MKDIR_P) $(@D)
|
||||
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
|
||||
|
||||
am--depfiles: $(am__depfiles_remade)
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
moo-main.o: main.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(moo_CPPFLAGS) $(CPPFLAGS) $(moo_CFLAGS) $(CFLAGS) -MT moo-main.o -MD -MP -MF $(DEPDIR)/moo-main.Tpo -c -o moo-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/moo-main.Tpo $(DEPDIR)/moo-main.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='moo-main.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(moo_CPPFLAGS) $(CPPFLAGS) $(moo_CFLAGS) $(CFLAGS) -c -o moo-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
|
||||
|
||||
moo-main.obj: main.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(moo_CPPFLAGS) $(CPPFLAGS) $(moo_CFLAGS) $(CFLAGS) -MT moo-main.obj -MD -MP -MF $(DEPDIR)/moo-main.Tpo -c -o moo-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/moo-main.Tpo $(DEPDIR)/moo-main.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='moo-main.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(moo_CPPFLAGS) $(CPPFLAGS) $(moo_CFLAGS) $(CFLAGS) -c -o moo-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`
|
||||
|
||||
moo_gtk-gtk-main.o: gtk-main.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(moo_gtk_CPPFLAGS) $(CPPFLAGS) $(moo_gtk_CFLAGS) $(CFLAGS) -MT moo_gtk-gtk-main.o -MD -MP -MF $(DEPDIR)/moo_gtk-gtk-main.Tpo -c -o moo_gtk-gtk-main.o `test -f 'gtk-main.c' || echo '$(srcdir)/'`gtk-main.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/moo_gtk-gtk-main.Tpo $(DEPDIR)/moo_gtk-gtk-main.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gtk-main.c' object='moo_gtk-gtk-main.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(moo_gtk_CPPFLAGS) $(CPPFLAGS) $(moo_gtk_CFLAGS) $(CFLAGS) -c -o moo_gtk-gtk-main.o `test -f 'gtk-main.c' || echo '$(srcdir)/'`gtk-main.c
|
||||
|
||||
moo_gtk-gtk-main.obj: gtk-main.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(moo_gtk_CPPFLAGS) $(CPPFLAGS) $(moo_gtk_CFLAGS) $(CFLAGS) -MT moo_gtk-gtk-main.obj -MD -MP -MF $(DEPDIR)/moo_gtk-gtk-main.Tpo -c -o moo_gtk-gtk-main.obj `if test -f 'gtk-main.c'; then $(CYGPATH_W) 'gtk-main.c'; else $(CYGPATH_W) '$(srcdir)/gtk-main.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/moo_gtk-gtk-main.Tpo $(DEPDIR)/moo_gtk-gtk-main.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gtk-main.c' object='moo_gtk-gtk-main.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(moo_gtk_CPPFLAGS) $(CPPFLAGS) $(moo_gtk_CFLAGS) $(CFLAGS) -c -o moo_gtk-gtk-main.obj `if test -f 'gtk-main.c'; then $(CYGPATH_W) 'gtk-main.c'; else $(CYGPATH_W) '$(srcdir)/gtk-main.c'; fi`
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f ./$(DEPDIR)/moo-main.Po
|
||||
-rm -f ./$(DEPDIR)/moo_gtk-gtk-main.Po
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f ./$(DEPDIR)/moo-main.Po
|
||||
-rm -f ./$(DEPDIR)/moo_gtk-gtk-main.Po
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
|
||||
clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
|
||||
ctags ctags-am distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-binPROGRAMS \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-am uninstall uninstall-am uninstall-binPROGRAMS
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
433
bin/gtk-main.c
Normal file
433
bin/gtk-main.c
Normal file
@ -0,0 +1,433 @@
|
||||
/*
|
||||
* EXPERIMENTAL CODE TO DEMONSTRATE HOW TO CREATE A GUI LOG CONSOLE.
|
||||
* The purpose of this application is not to create a full gui environment.
|
||||
* I just want to create a autonomous gui log console like the text terminal.
|
||||
*
|
||||
* 1. create a general program that reads from a pipe and show contents.
|
||||
* - the moo's log write doesn't need to be modified.
|
||||
*
|
||||
*
|
||||
* 2. override the log_write callback to call the gtk text output gui function.
|
||||
* not possible to use moo as a main loop as gtk doesn't expose the event loop file descriptor
|
||||
* must use thread. the thread can't make a gui call.
|
||||
*
|
||||
* 3. execute moo when idle?
|
||||
* need to break down moo_invoke() to smaller pieces
|
||||
* no looping in moo_invoke(). it should be made to allow stepping from the caller side.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <moo-std.h>
|
||||
#include <moo-utl.h>
|
||||
#include <string.h>
|
||||
|
||||
GtkWidget* log_view = NULL;
|
||||
GThread* moo_thread = NULL;
|
||||
moo_t* moo_vm = NULL;
|
||||
|
||||
/* ========================================================================= */
|
||||
|
||||
static void print_syntax_error (moo_t* moo, const char* main_src_file)
|
||||
{
|
||||
moo_synerr_t synerr;
|
||||
|
||||
moo_getsynerr (moo, &synerr);
|
||||
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, "ERROR: ");
|
||||
if (synerr.loc.file)
|
||||
{
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, "%js", synerr.loc.file);
|
||||
}
|
||||
else
|
||||
{
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, "%s", main_src_file);
|
||||
}
|
||||
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, "[%zu,%zu] %js",
|
||||
synerr.loc.line, synerr.loc.colm,
|
||||
(moo_geterrmsg(moo) != moo_geterrstr(moo)? moo_geterrmsg(moo): moo_geterrstr(moo))
|
||||
);
|
||||
|
||||
if (synerr.tgt.len > 0)
|
||||
{
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, " - %.*js", synerr.tgt.len, synerr.tgt.ptr);
|
||||
}
|
||||
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, "\n");
|
||||
}
|
||||
|
||||
struct log_data_t
|
||||
{
|
||||
GtkTextBuffer *buffer;
|
||||
moo_bch_t* ptr;
|
||||
moo_oow_t len;
|
||||
};
|
||||
|
||||
static gboolean append_log_textbuffer(struct log_data_t *data)
|
||||
{
|
||||
gtk_text_buffer_insert_at_cursor(data->buffer, data->ptr, data->len);
|
||||
g_free (data->ptr);
|
||||
g_free(data);
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
void write_log (GtkWidget* buffer, const moo_bch_t* ptr, moo_oow_t len)
|
||||
{
|
||||
/* cannot call gtk_text_buffer_insert_at_cursor() in a non-GUI thread.
|
||||
* use gdk_threads_add_idle() to append the task. i don't like it. */
|
||||
struct log_data_t* data = g_new0(struct log_data_t, 1);
|
||||
data->ptr = g_strndup(ptr, len);
|
||||
data->len = len;
|
||||
data->buffer = GTK_TEXT_BUFFER(buffer);
|
||||
gdk_threads_add_idle(append_log_textbuffer, data);
|
||||
}
|
||||
|
||||
static void log_write (moo_t* moo, moo_bitmask_t mask, const moo_ooch_t* msg, moo_oow_t len)
|
||||
{
|
||||
GtkWidget* buffer;
|
||||
moo_bch_t buf[256];
|
||||
moo_oow_t ucslen, bcslen, msgidx;
|
||||
moo_cmgr_t* log_cmgr = moo_get_utf8_cmgr();
|
||||
int n;
|
||||
|
||||
time_t now;
|
||||
#if defined(MOO_OOCH_IS_UCH)
|
||||
char ts[32 * MOO_BCSIZE_MAX];
|
||||
#else
|
||||
char ts[32];
|
||||
#endif
|
||||
size_t tslen;
|
||||
struct tm tm, *tmp;
|
||||
|
||||
buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(log_view));
|
||||
|
||||
now = time(MOO_NULL);
|
||||
#if defined(_WIN32)
|
||||
tmp = localtime(&now);
|
||||
tslen = strftime(ts, sizeof(ts), "%Y-%m-%d %H:%M:%S %z ", tmp);
|
||||
if (tslen == 0)
|
||||
{
|
||||
tslen = sprintf(ts, "%04d-%02d-%02d %02d:%02d:%02d ", tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday, tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
|
||||
}
|
||||
#elif defined(__OS2__)
|
||||
#if defined(__WATCOMC__)
|
||||
tmp = _localtime(&now, &tm);
|
||||
#else
|
||||
tmp = localtime(&now);
|
||||
#endif
|
||||
|
||||
#if defined(__BORLANDC__)
|
||||
/* the borland compiler doesn't handle %z properly - it showed 00 all the time */
|
||||
tslen = strftime(ts, sizeof(ts), "%Y-%m-%d %H:%M:%S %Z ", tmp);
|
||||
#else
|
||||
tslen = strftime(ts, sizeof(ts), "%Y-%m-%d %H:%M:%S %z ", tmp);
|
||||
#endif
|
||||
if (tslen == 0)
|
||||
{
|
||||
tslen = sprintf(ts, "%04d-%02d-%02d %02d:%02d:%02d ", tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday, tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
|
||||
}
|
||||
|
||||
#elif defined(__DOS__)
|
||||
tmp = localtime(&now);
|
||||
/* since i know that %z/%Z is not available in strftime, i switch to sprintf immediately */
|
||||
tslen = sprintf(ts, "%04d-%02d-%02d %02d:%02d:%02d ", tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday, tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
|
||||
#else
|
||||
#if defined(HAVE_LOCALTIME_R)
|
||||
tmp = localtime_r(&now, &tm);
|
||||
#else
|
||||
tmp = localtime(&now);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_STRFTIME_SMALL_Z)
|
||||
tslen = strftime(ts, sizeof(ts), "%Y-%m-%d %H:%M:%S %z ", tmp);
|
||||
#else
|
||||
tslen = strftime(ts, sizeof(ts), "%Y-%m-%d %H:%M:%S %Z ", tmp);
|
||||
#endif
|
||||
if (tslen == 0)
|
||||
{
|
||||
tslen = sprintf(ts, "%04d-%02d-%02d %02d:%02d:%02d ", tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday, tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(MOO_OOCH_IS_UCH)
|
||||
if (moo_getcmgr(moo) != log_cmgr)
|
||||
{
|
||||
moo_uch_t tsu[32];
|
||||
moo_oow_t tsulen;
|
||||
|
||||
/* the timestamp is likely to contain simple ascii characters only.
|
||||
* conversion is not likely to fail regardless of encodings.
|
||||
* so i don't check errors here */
|
||||
tsulen = MOO_COUNTOF(tsu);
|
||||
moo_convbtooochars (moo, ts, &tslen, tsu, &tsulen);
|
||||
tslen = MOO_COUNTOF(ts);
|
||||
moo_conv_uchars_to_bchars_with_cmgr (tsu, &tsulen, ts, &tslen, log_cmgr);
|
||||
}
|
||||
#endif
|
||||
|
||||
write_log (buffer, ts, tslen);
|
||||
|
||||
#if defined(MOO_OOCH_IS_UCH)
|
||||
msgidx = 0;
|
||||
while (len > 0)
|
||||
{
|
||||
ucslen = len;
|
||||
bcslen = MOO_COUNTOF(buf);
|
||||
|
||||
/*n = moo_convootobchars(moo, &msg[msgidx], &ucslen, buf, &bcslen);*/
|
||||
n = moo_conv_uchars_to_bchars_with_cmgr(&msg[msgidx], &ucslen, buf, &bcslen, log_cmgr);
|
||||
if (n == 0 || n == -2)
|
||||
{
|
||||
/* n = 0:
|
||||
* converted all successfully
|
||||
* n == -2:
|
||||
* buffer not sufficient. not all got converted yet.
|
||||
* write what have been converted this round. */
|
||||
|
||||
MOO_ASSERT (moo, ucslen > 0); /* if this fails, the buffer size must be increased */
|
||||
|
||||
/* attempt to write all converted characters */
|
||||
write_log (buffer, buf, bcslen);
|
||||
|
||||
if (n == 0) break;
|
||||
else
|
||||
{
|
||||
msgidx += ucslen;
|
||||
len -= ucslen;
|
||||
}
|
||||
}
|
||||
else if (n <= -1)
|
||||
{
|
||||
/* conversion error but i just stop here but don't treat it as a hard error. */
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
write_log (buffer, msg, len);
|
||||
#endif
|
||||
}
|
||||
|
||||
static gboolean clear_moo_thread (gpointer user_data)
|
||||
{
|
||||
if (moo_thread)
|
||||
{
|
||||
g_thread_join (moo_thread);
|
||||
moo_thread = NULL;
|
||||
moo_vm = NULL;
|
||||
}
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
/* ========================================================================= */
|
||||
|
||||
#define MIN_MEMSIZE 2048000ul
|
||||
|
||||
gpointer moo_thread_func (gpointer ctx)
|
||||
{
|
||||
static moo_ooch_t str_my_object[] = { 'M', 'y', 'O', 'b','j','e','c','t' }; /*TODO: make this an argument */
|
||||
static moo_ooch_t str_main[] = { 'm', 'a', 'i', 'n' };
|
||||
|
||||
moo_t* moo;
|
||||
moo_cfgstd_t cfg;
|
||||
moo_errinf_t errinf;
|
||||
|
||||
moo_iostd_t in;
|
||||
|
||||
moo_oocs_t objname;
|
||||
moo_oocs_t mthname;
|
||||
int i, xret;
|
||||
|
||||
memset (&cfg, 0, MOO_SIZEOF(cfg));
|
||||
cfg.type = MOO_CFGSTD_OPTB;
|
||||
cfg.cmgr = moo_get_utf8_cmgr();
|
||||
cfg.input_cmgr = cfg.cmgr;
|
||||
cfg.log_cmgr = cfg.cmgr;
|
||||
cfg.u.optb.log = "/dev/stderr,warn+";
|
||||
cfg.log_write = log_write;
|
||||
|
||||
moo = moo_openstd(0, &cfg, &errinf);
|
||||
if (!moo)
|
||||
{
|
||||
#if defined(MOO_OOCH_IS_BCH)
|
||||
fprintf (stderr, "ERROR: cannot open moo - [%d] %s\n", (int)errinf.num, errinf.msg);
|
||||
#elif (MOO_SIZEOF_UCH_T == MOO_SIZEOF_WCHAR_T)
|
||||
fprintf (stderr, "ERROR: cannot open moo - [%d] %ls\n", (int)errinf.num, errinf.msg);
|
||||
#else
|
||||
moo_bch_t bcsmsg[MOO_COUNTOF(errinf.msg) * 2]; /* error messages may get truncated */
|
||||
moo_oow_t wcslen, bcslen;
|
||||
bcslen = MOO_COUNTOF(bcsmsg);
|
||||
moo_conv_ucstr_to_utf8 (errinf.msg, &wcslen, bcsmsg, &bcslen);
|
||||
fprintf (stderr, "ERROR: cannot open moo - [%d] %s\n", (int)errinf.num, bcsmsg);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
{
|
||||
moo_oow_t tab_size;
|
||||
|
||||
tab_size = 5000;
|
||||
moo_setoption (moo, MOO_OPTION_SYMTAB_SIZE, &tab_size);
|
||||
tab_size = 5000;
|
||||
moo_setoption (moo, MOO_OPTION_SYSDIC_SIZE, &tab_size);
|
||||
tab_size = 600;
|
||||
moo_setoption (moo, MOO_OPTION_PROCSTK_SIZE, &tab_size);
|
||||
}
|
||||
|
||||
if (moo_ignite(moo, MIN_MEMSIZE) <= -1)
|
||||
{
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, "ERROR: cannot ignite moo - [%d] %js\n", moo_geterrnum(moo), moo_geterrstr(moo));
|
||||
moo_close (moo);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
memset (&in, 0, MOO_SIZEOF(in));
|
||||
#if 1
|
||||
in.type = MOO_IOSTD_FILEB;
|
||||
in.u.fileb.path = "../../kernel/test-001.moo";
|
||||
#else
|
||||
moo_uch_t tmp[1000];
|
||||
moo_oow_t bcslen, ucslen;
|
||||
ucslen = MOO_COUNTOF(tmp);
|
||||
moo_conv_utf8_to_ucstr("../../kernel/test-001.moo", &bcslen, tmp, &ucslen);
|
||||
in.type = MOO_IOSTD_FILEU;
|
||||
in.u.fileu.path = tmp;
|
||||
#endif
|
||||
in.cmgr = MOO_NULL;
|
||||
|
||||
/*compile:*/
|
||||
if (moo_compilestd(moo, &in, 1) <= -1)
|
||||
{
|
||||
if (moo->errnum == MOO_ESYNERR)
|
||||
{
|
||||
print_syntax_error (moo, in.u.fileb.path);
|
||||
}
|
||||
else
|
||||
{
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, "ERROR: cannot compile code - [%d] %js\n", moo_geterrnum(moo), moo_geterrmsg(moo));
|
||||
}
|
||||
|
||||
moo_close (moo);
|
||||
return -1;
|
||||
}
|
||||
|
||||
MOO_DEBUG0 (moo, "COMPILE OK. STARTING EXECUTION...\n");
|
||||
xret = 0;
|
||||
|
||||
|
||||
moo_start_ticker ();
|
||||
|
||||
moo_rcvtickstd (moo, 1);
|
||||
|
||||
objname.ptr = str_my_object;
|
||||
objname.len = 8;
|
||||
mthname.ptr = str_main;
|
||||
mthname.len = 4;
|
||||
if (moo_invoke(moo, &objname, &mthname) <= -1)
|
||||
{
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, "ERROR: cannot execute code - [%d] %js\n", moo_geterrnum(moo), moo_geterrmsg(moo));
|
||||
xret = -1;
|
||||
}
|
||||
|
||||
moo_stop_ticker ();
|
||||
|
||||
/*moo_dumpsymtab(moo);
|
||||
moo_dumpdic(moo, moo->sysdic, "System dictionary");*/
|
||||
|
||||
moo_close (moo);
|
||||
|
||||
gdk_threads_add_idle(clear_moo_thread, NULL);
|
||||
return xret;
|
||||
}
|
||||
|
||||
|
||||
static void start_moo (GtkWidget* widget, gpointer user_data)
|
||||
{
|
||||
if (!moo_thread)
|
||||
moo_thread = g_thread_new("moo", moo_thread_func, NULL);
|
||||
}
|
||||
|
||||
static void abort_moo ()
|
||||
{
|
||||
if (moo_vm) moo_abortstd (moo_vm);
|
||||
}
|
||||
|
||||
static void activate (GtkApplication *app, gpointer user_data)
|
||||
{
|
||||
/* Declare variables */
|
||||
GtkWidget *window;
|
||||
/*GtkWidget *log_view; */
|
||||
GtkWidget *scrolled_window;
|
||||
GtkWidget *button;
|
||||
GtkWidget* table;
|
||||
|
||||
GtkTextBuffer *buffer;
|
||||
|
||||
/* Create a window with a title, and a default size */
|
||||
window = gtk_application_window_new (app);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "MOO LOGS");
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 720, 200);
|
||||
|
||||
|
||||
/* The text buffer represents the text being edited */
|
||||
buffer = gtk_text_buffer_new(NULL);
|
||||
|
||||
/* Text view is a widget in which can display the text buffer.
|
||||
* The line wrapping is set to break lines in between words.
|
||||
*/
|
||||
log_view = gtk_text_view_new_with_buffer(buffer);
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW(log_view), GTK_WRAP_WORD);
|
||||
gtk_text_view_set_editable (GTK_TEXT_VIEW(log_view), FALSE);
|
||||
|
||||
/* Create the scrolled window. Usually NULL is passed for both parameters so
|
||||
* that it creates the horizontal/vertical adjustments automatically. Setting
|
||||
* the scrollbar policy to automatic allows the scrollbars to only show up
|
||||
* when needed.
|
||||
*/
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
/* The function directly below is used to add children to the scrolled window
|
||||
* with scrolling capabilities (e.g log_view), otherwise,
|
||||
* gtk_scrolled_window_add_with_viewport() would have been used
|
||||
*/
|
||||
gtk_container_add (GTK_CONTAINER(scrolled_window), log_view);
|
||||
gtk_container_set_border_width (GTK_CONTAINER(scrolled_window), 5);
|
||||
|
||||
button = gtk_button_new_with_label("Start");
|
||||
g_signal_connect (button, "clicked", G_CALLBACK(start_moo), NULL);
|
||||
|
||||
|
||||
table = gtk_table_new(6, 2, FALSE);
|
||||
gtk_table_set_col_spacings(GTK_TABLE(table), 3);
|
||||
gtk_table_set_row_spacing(GTK_TABLE(table), 0, 3);
|
||||
|
||||
gtk_table_attach(GTK_TABLE(table), scrolled_window, 0, 2, 0, 4,
|
||||
GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 1, 1);
|
||||
gtk_table_attach(GTK_TABLE(table), button, 1, 2, 5, 6,
|
||||
0/*GTK_FILL | GTK_EXPAND*/, 0/*GTK_FILL | GTK_EXPAND*/, 0, 0);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER(window), table);
|
||||
|
||||
/*g_signal_connect (window, "destroy", G_CALLBACK(quit_app), NULL);*/
|
||||
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
GtkApplication *app;
|
||||
int status;
|
||||
|
||||
app = gtk_application_new ("moo.log", G_APPLICATION_FLAGS_NONE);
|
||||
g_signal_connect (app, "activate", G_CALLBACK(activate), NULL);
|
||||
status = g_application_run (G_APPLICATION(app), argc, argv);
|
||||
g_object_unref (app);
|
||||
|
||||
if (moo_thread)
|
||||
{
|
||||
g_thread_join (moo_thread);
|
||||
moo_thread = NULL;
|
||||
}
|
||||
return status;
|
||||
}
|
44
bin/main-mac.c
Normal file
44
bin/main-mac.c
Normal file
@ -0,0 +1,44 @@
|
||||
#include <Types.h>
|
||||
#include <Memory.h>
|
||||
#include <QuickDraw.h>
|
||||
#include <Fonts.h>
|
||||
#include <Events.h>
|
||||
#include <Menus.h>
|
||||
#include <TextEdit.h>
|
||||
#include <MacWindows.h>
|
||||
#include <OSUtils.h>
|
||||
#include <ToolUtils.h>
|
||||
|
||||
|
||||
static void InitToolBox (void)
|
||||
{
|
||||
GrafPtr wmgrPort;
|
||||
|
||||
#if defined(TARGET_API_MAC_CARBON) && (TARGET_API_MAC_CARBON > 0)
|
||||
/* no init required for the managers below in Carbon */
|
||||
#else
|
||||
InitGraf (&qd.thePort);
|
||||
InitFonts ();
|
||||
InitWindows ();
|
||||
InitMenus ();
|
||||
TEInit ();
|
||||
InitDialogs (0L);
|
||||
MaxApplZone ();
|
||||
#endif
|
||||
|
||||
InitCursor ();
|
||||
|
||||
#if defined(TARGET_API_MAC_CARBON) && (TARGET_API_MAC_CARBON > 0)
|
||||
wmgrPort = CreateNewPort();
|
||||
#else
|
||||
GetWMgrPort (&wmgrPort);
|
||||
#endif
|
||||
|
||||
SetPort (wmgrPort);
|
||||
}
|
||||
|
||||
|
||||
static void EventLoop (void)
|
||||
{
|
||||
|
||||
}
|
348
bin/main.c
Normal file
348
bin/main.c
Normal file
@ -0,0 +1,348 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <moo-std.h>
|
||||
#include <moo-utl.h>
|
||||
#include <moo-opt.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <locale.h>
|
||||
|
||||
#if (defined(__unix) || defined(__linux) || defined(__ultrix) || defined(_AIX) || defined(__hpux) || defined(__sgi)) && defined(HAVE_SIGNAL_H)
|
||||
# include <signal.h>
|
||||
#endif
|
||||
|
||||
static void print_syntax_error (moo_t* moo, const char* main_src_file)
|
||||
{
|
||||
moo_synerr_t synerr;
|
||||
|
||||
moo_getsynerr (moo, &synerr);
|
||||
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, "ERROR: ");
|
||||
if (synerr.loc.file)
|
||||
{
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, "%js", synerr.loc.file);
|
||||
}
|
||||
else
|
||||
{
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, "%s", main_src_file);
|
||||
}
|
||||
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, "[%zu,%zu] %js",
|
||||
synerr.loc.line, synerr.loc.colm,
|
||||
(moo_geterrmsg(moo) != moo_geterrstr(moo)? moo_geterrmsg(moo): moo_geterrstr(moo))
|
||||
);
|
||||
|
||||
if (synerr.tgt.len > 0)
|
||||
{
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, " - %.*js", synerr.tgt.len, synerr.tgt.ptr);
|
||||
}
|
||||
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, "\n");
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
|
||||
#define MIN_HEAPSIZE 2048000ul
|
||||
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
static moo_ooch_t str_my_object[] = { 'M', 'y', 'O', 'b','j','e','c','t' }; /*TODO: make this an argument */
|
||||
static moo_ooch_t str_main[] = { 'm', 'a', 'i', 'n' };
|
||||
|
||||
moo_t* moo;
|
||||
moo_cfgstd_t cfg;
|
||||
moo_errinf_t errinf;
|
||||
|
||||
moo_oocs_t objname;
|
||||
moo_oocs_t mthname;
|
||||
moo_oow_t heapsize;
|
||||
int i, xret;
|
||||
|
||||
moo_bci_t c;
|
||||
static moo_bopt_lng_t lopt[] =
|
||||
{
|
||||
{ ":log", 'l' },
|
||||
{ ":heapsize", '\0' },
|
||||
{ ":gctype", '\0' },
|
||||
{ ":procstksize", '\0' },
|
||||
{ "large-pages", '\0' },
|
||||
{ ":base-charset", '\0' },
|
||||
{ ":input-charset", '\0' },
|
||||
{ ":log-charset", '\0' },
|
||||
#if defined(MOO_BUILD_DEBUG)
|
||||
{ ":debug", '\0' }, /* [NOTE] there is no short option for --debug */
|
||||
#endif
|
||||
{ MOO_NULL, '\0' }
|
||||
};
|
||||
static moo_bopt_t opt =
|
||||
{
|
||||
"l:m:",
|
||||
lopt
|
||||
};
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
#if !defined(macintosh)
|
||||
if (argc < 2)
|
||||
{
|
||||
print_usage:
|
||||
fprintf (stderr, "Usage: %s [options] filename ...\n", argv[0]);
|
||||
fprintf (stderr, " --log filename[,logopts]\n");
|
||||
fprintf (stderr, " --heapsize=bytes\n");
|
||||
fprintf (stderr, " --gctype=ms|ss\n");
|
||||
fprintf (stderr, " --procstksize=number of oops\n");
|
||||
fprintf (stderr, " --large-pages\n");
|
||||
fprintf (stderr, " --base-charset=name\n");
|
||||
fprintf (stderr, " --input-charset=name\n");
|
||||
fprintf (stderr, " --log-charset=name\n");
|
||||
|
||||
#if defined(MOO_BUILD_DEBUG)
|
||||
fprintf (stderr, " --debug dbgopts\n");
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
memset (&cfg, 0, MOO_SIZEOF(cfg));
|
||||
cfg.type = MOO_CFGSTD_OPTB;
|
||||
cfg.cmgr = moo_get_utf8_cmgr();
|
||||
cfg.input_cmgr = cfg.cmgr;
|
||||
cfg.log_cmgr = cfg.cmgr;
|
||||
|
||||
heapsize = MIN_HEAPSIZE;
|
||||
|
||||
while ((c = moo_getbopt(argc, argv, &opt)) != MOO_BCI_EOF)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case 'l':
|
||||
cfg.u.optb.log = opt.arg;
|
||||
break;
|
||||
|
||||
case '\0':
|
||||
if (moo_comp_bcstr(opt.lngopt, "heapsize") == 0)
|
||||
{
|
||||
heapsize = strtoul(opt.arg, MOO_NULL, 0);
|
||||
break;
|
||||
}
|
||||
else if (moo_comp_bcstr(opt.lngopt, "gctype") == 0)
|
||||
{
|
||||
if (moo_comp_bcstr(opt.arg, "ms") == 0)
|
||||
cfg.gc_type = MOO_GC_TYPE_MARK_SWEEP;
|
||||
else
|
||||
cfg.gc_type = MOO_GC_TYPE_SEMISPACE;
|
||||
break;
|
||||
}
|
||||
else if (moo_comp_bcstr(opt.lngopt, "procstksize") == 0)
|
||||
{
|
||||
cfg.proc_stk_size = strtoul(opt.arg, MOO_NULL, 0);
|
||||
break;
|
||||
}
|
||||
else if (moo_comp_bcstr(opt.lngopt, "large-pages") == 0)
|
||||
{
|
||||
cfg.large_pages = 1;
|
||||
break;
|
||||
}
|
||||
else if (moo_comp_bcstr(opt.lngopt, "base-charset") == 0)
|
||||
{
|
||||
cfg.cmgr = moo_get_cmgr_by_bcstr(opt.arg);
|
||||
if (!cfg.cmgr)
|
||||
{
|
||||
fprintf (stderr, "unknown base-charset name - %s\n", opt.arg);
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (moo_comp_bcstr(opt.lngopt, "input-charset") == 0)
|
||||
{
|
||||
cfg.input_cmgr = moo_get_cmgr_by_bcstr(opt.arg);
|
||||
if (!cfg.input_cmgr)
|
||||
{
|
||||
fprintf (stderr, "unknown input-charset name - %s\n", opt.arg);
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (moo_comp_bcstr(opt.lngopt, "log-charset") == 0)
|
||||
{
|
||||
cfg.log_cmgr = moo_get_cmgr_by_bcstr(opt.arg);
|
||||
if (!cfg.log_cmgr)
|
||||
{
|
||||
fprintf (stderr, "unknown log-charset name - %s\n", opt.arg);
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
#if defined(MOO_BUILD_DEBUG)
|
||||
else if (moo_comp_bcstr(opt.lngopt, "debug") == 0)
|
||||
{
|
||||
cfg.u.optb.dbg = opt.arg;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
goto print_usage;
|
||||
|
||||
case ':':
|
||||
if (opt.lngopt)
|
||||
fprintf (stderr, "bad argument for '%s'\n", opt.lngopt);
|
||||
else
|
||||
fprintf (stderr, "bad argument for '%c'\n", opt.opt);
|
||||
|
||||
return -1;
|
||||
|
||||
default:
|
||||
goto print_usage;
|
||||
}
|
||||
}
|
||||
|
||||
if (opt.ind >= argc) goto print_usage;
|
||||
#endif
|
||||
|
||||
moo = moo_openstd(0, &cfg, &errinf);
|
||||
if (!moo)
|
||||
{
|
||||
#if defined(MOO_OOCH_IS_BCH)
|
||||
fprintf (stderr, "ERROR: cannot open moo - [%d] %s\n", (int)errinf.num, errinf.msg);
|
||||
#elif (MOO_SIZEOF_UCH_T == MOO_SIZEOF_WCHAR_T)
|
||||
fprintf (stderr, "ERROR: cannot open moo - [%d] %ls\n", (int)errinf.num, errinf.msg);
|
||||
#else
|
||||
moo_bch_t bcsmsg[MOO_COUNTOF(errinf.msg) * 2]; /* error messages may get truncated */
|
||||
moo_oow_t wcslen, bcslen;
|
||||
bcslen = MOO_COUNTOF(bcsmsg);
|
||||
moo_conv_ucstr_to_utf8 (errinf.msg, &wcslen, bcsmsg, &bcslen);
|
||||
fprintf (stderr, "ERROR: cannot open moo - [%d] %s\n", (int)errinf.num, bcsmsg);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
{
|
||||
moo_oow_t tab_size;
|
||||
tab_size = 5000;
|
||||
moo_setoption (moo, MOO_OPTION_SYMTAB_SIZE, &tab_size);
|
||||
tab_size = 5000;
|
||||
moo_setoption (moo, MOO_OPTION_SYSDIC_SIZE, &tab_size);
|
||||
}
|
||||
|
||||
if (cfg.gc_type == MOO_GC_TYPE_SEMISPACE && heapsize <= MIN_HEAPSIZE) heapsize = MIN_HEAPSIZE;
|
||||
if (moo_ignite(moo, heapsize) <= -1)
|
||||
{
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, "ERROR: cannot ignite moo - [%d] %js\n", moo_geterrnum(moo), moo_geterrstr(moo));
|
||||
moo_close (moo);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* TODO: don't initialize debug information if debug info is not requested.
|
||||
* call moo_loaddbgi() if loading a compiled image... */
|
||||
if (moo_initdbgi(moo, 102400) <= -1) /* TODO: set initial debug information size from a configurable value */
|
||||
{
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, "ERROR: cannot initialize debug information - [%d] %js\n", moo_geterrnum(moo), moo_geterrstr(moo));
|
||||
moo_close (moo);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
#if defined(macintosh)
|
||||
i = 20;
|
||||
xtn->source_path = "test.moo";
|
||||
goto compile;
|
||||
#endif
|
||||
*/
|
||||
for (i = opt.ind; i < argc; i++)
|
||||
{
|
||||
moo_iostd_t in;
|
||||
|
||||
memset (&in, 0, MOO_SIZEOF(in));
|
||||
#if 1
|
||||
in.type = MOO_IOSTD_FILEB;
|
||||
in.u.fileb.path = argv[i];
|
||||
#else
|
||||
moo_uch_t tmp[1000];
|
||||
moo_oow_t bcslen, ucslen;
|
||||
ucslen = MOO_COUNTOF(tmp);
|
||||
moo_conv_utf8_to_ucstr(argv[i], &bcslen, tmp, &ucslen);
|
||||
in.type = MOO_IOSTD_FILEU;
|
||||
in.u.fileu.path = tmp;
|
||||
#endif
|
||||
in.cmgr = MOO_NULL;
|
||||
|
||||
/*compile:*/
|
||||
if (moo_compilestd(moo, &in, 1) <= -1)
|
||||
{
|
||||
if (moo->errnum == MOO_ESYNERR)
|
||||
{
|
||||
print_syntax_error (moo, argv[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, "ERROR: cannot compile code - [%d] %js\n", moo_geterrnum(moo), moo_geterrmsg(moo));
|
||||
}
|
||||
|
||||
moo_close (moo);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/*MOO_DEBUG2 (moo, "XXXXXXXXXXXXXXXXXXXXX %O %zd\n", moo_ooitoint(moo, MOO_TYPE_MIN(moo_ooi_t)), MOO_TYPE_MIN(moo_ooi_t));
|
||||
MOO_DEBUG2 (moo, "XXXXXXXXXXXXXXXXXXXXX %O %jd\n", moo_intmaxtoint(moo, MOO_TYPE_MIN(moo_intmax_t)), MOO_TYPE_MIN(moo_intmax_t));
|
||||
MOO_DEBUG2 (moo, "XXXXXXXXXXXXXXXXXXXXX %O %ju\n", moo_uintmaxtoint(moo, MOO_TYPE_MAX(moo_uintmax_t)), MOO_TYPE_MAX(moo_uintmax_t));
|
||||
MOO_DEBUG2 (moo, "XXXXXXXXXXXXXXXXXXXXX %O %zu\n", moo_oowtoint(moo, MOO_TYPE_MAX(moo_oow_t)), MOO_TYPE_MAX(moo_oow_t));*/
|
||||
|
||||
MOO_DEBUG0 (moo, "COMPILE OK. STARTING EXECUTION...\n");
|
||||
xret = 0;
|
||||
|
||||
#if defined(SIGINT) && defined(HAVE_SIGNAL)
|
||||
/* i'd like the program to ignore the interrupt signal
|
||||
* before moo_catch_termreq() and after moo_uncatch_termreq() */
|
||||
signal (SIGINT, SIG_IGN);
|
||||
signal (SIGTERM, SIG_IGN);
|
||||
#endif
|
||||
|
||||
moo_catch_termreq ();
|
||||
moo_start_ticker ();
|
||||
|
||||
moo_rcvtickstd (moo, 1);
|
||||
|
||||
objname.ptr = str_my_object;
|
||||
objname.len = 8;
|
||||
mthname.ptr = str_main;
|
||||
mthname.len = 4;
|
||||
if (moo_invoke(moo, &objname, &mthname) <= -1)
|
||||
{
|
||||
moo_logbfmt (moo, MOO_LOG_STDERR, "ERROR: cannot execute code - [%d] %js\n", moo_geterrnum(moo), moo_geterrmsg(moo));
|
||||
xret = -1;
|
||||
}
|
||||
|
||||
moo_stop_ticker ();
|
||||
moo_uncatch_termreq ();
|
||||
|
||||
/*moo_dumpsymtab(moo);
|
||||
moo_dumpdic(moo, moo->sysdic, "System dictionary");*/
|
||||
|
||||
moo_close (moo);
|
||||
return xret;
|
||||
}
|
Reference in New Issue
Block a user