DRIVERS=@DRIVERS@
bin_PROGRAMS = lcd4linux
-lib_LTLIBRARIES = liblcd4linux.la
+#lib_LTLIBRARIES = liblcd4linux.la
AM_CFLAGS = $(X_CFLAGS) -D_GNU_SOURCE -Wall
lcd4linux_LDFLAGS = $(X_LIBS)
-lcd4linux_LDADD = liblcd4linux.la @DRVLIBS@
+lcd4linux_LDADD = @DRIVERS@ @DRVLIBS@
+#lcd4linux_LDADD = liblcd4linux.la @DRVLIBS@
+#remove next line for liblcd4linux
+lcd4linux_DEPENDENCIES = @DRIVERS@
lcd4linux_SOURCES = \
lcd4linux.c \
parser.c parser.h \
processor.c processor.h \
layout.c layout.h \
+timer.c timer.h \
evaluator.c evaluator.h \
+widget.c widget.h \
+widget_text.c widget_text.h \
plugin.c plugin.h \
plugin_math.c \
plugin_string.c \
plugin_cfg.c \
plugin_xmms.c \
plugin_i2c_sensors.c \
-widget.c widget.h \
-widget_text.c widget_text.h \
system.c system.h \
isdn.c isdn.h \
wifi.c wifi.h \
expr.c expr.h \
mail2.c \
socket.c socket.h \
-imon.c imon.h
-
-liblcd4linux_la_DEPENDENCIES = @DRIVERS@
-liblcd4linux_la_LDFLAGS = -version-info 9:12:9
-liblcd4linux_la_LIBADD = @DRIVERS@
-
-liblcd4linux_la_SOURCES = \
+imon.c imon.h \
+\
display.c display.h \
drv.c drv.h \
debug.c debug.h \
fontmap.c fontmap.h \
udelay.c udelay.h
+#liblcd4linux_la_DEPENDENCIES = @DRIVERS@
+#liblcd4linux_la_LDFLAGS = -version-info 9:12:9
+#liblcd4linux_la_LIBADD = @DRIVERS@
+
+#liblcd4linux_la_SOURCES = \
+#display.c display.h \
+#drv.c drv.h \
+#debug.c debug.h \
+#cfg.c cfg.h \
+#lock.c lock.h \
+#pixmap.c pixmap.h \
+#bar.c bar.h \
+#icon.c icon.h \
+#fontmap.c fontmap.h \
+#udelay.c udelay.h
+
EXTRA_lcd4linux_SOURCES= \
parport.c parport.h \
BeckmannEgle.c \
DRIVERS = @DRIVERS@
bin_PROGRAMS = lcd4linux
-lib_LTLIBRARIES = liblcd4linux.la
+#lib_LTLIBRARIES = liblcd4linux.la
AM_CFLAGS = $(X_CFLAGS) -D_GNU_SOURCE -Wall
lcd4linux_LDFLAGS = $(X_LIBS)
-lcd4linux_LDADD = liblcd4linux.la @DRVLIBS@
-
-lcd4linux_SOURCES = lcd4linux.c pid.c pid.h parser.c parser.h processor.c processor.h layout.c layout.h evaluator.c evaluator.h plugin.c plugin.h plugin_math.c plugin_string.c plugin_cfg.c plugin_xmms.c plugin_i2c_sensors.c widget.c widget.h widget_text.c widget_text.h system.c system.h isdn.c isdn.h wifi.c wifi.h mail.c mail.h seti.c seti.h battery.c battery.h dvb.c dvb.h filter.c filter.h exec.c exec.h expr.c expr.h mail2.c socket.c socket.h imon.c imon.h
-
-
-liblcd4linux_la_DEPENDENCIES = @DRIVERS@
-liblcd4linux_la_LDFLAGS = -version-info 9:12:9
-liblcd4linux_la_LIBADD = @DRIVERS@
-
-liblcd4linux_la_SOURCES = display.c display.h drv.c drv.h debug.c debug.h cfg.c cfg.h lock.c lock.h pixmap.c pixmap.h bar.c bar.h icon.c icon.h fontmap.c fontmap.h udelay.c udelay.h
-
+lcd4linux_LDADD = @DRIVERS@ @DRVLIBS@
+#lcd4linux_LDADD = liblcd4linux.la @DRVLIBS@
+#remove next line for liblcd4linux
+lcd4linux_DEPENDENCIES = @DRIVERS@
+
+lcd4linux_SOURCES = lcd4linux.c pid.c pid.h parser.c parser.h processor.c processor.h layout.c layout.h timer.c timer.h evaluator.c evaluator.h widget.c widget.h widget_text.c widget_text.h plugin.c plugin.h plugin_math.c plugin_string.c plugin_cfg.c plugin_xmms.c plugin_i2c_sensors.c system.c system.h isdn.c isdn.h wifi.c wifi.h mail.c mail.h seti.c seti.h battery.c battery.h dvb.c dvb.h filter.c filter.h exec.c exec.h expr.c expr.h mail2.c socket.c socket.h imon.c imon.h display.c display.h drv.c drv.h debug.c debug.h cfg.c cfg.h lock.c lock.h pixmap.c pixmap.h bar.c bar.h icon.c icon.h fontmap.c fontmap.h udelay.c udelay.h
+
+
+#liblcd4linux_la_DEPENDENCIES = @DRIVERS@
+#liblcd4linux_la_LDFLAGS = -version-info 9:12:9
+#liblcd4linux_la_LIBADD = @DRIVERS@
+
+#liblcd4linux_la_SOURCES = \
+#display.c display.h \
+#drv.c drv.h \
+#debug.c debug.h \
+#cfg.c cfg.h \
+#lock.c lock.h \
+#pixmap.c pixmap.h \
+#bar.c bar.h \
+#icon.c icon.h \
+#fontmap.c fontmap.h \
+#udelay.c udelay.h
EXTRA_lcd4linux_SOURCES = parport.c parport.h BeckmannEgle.c Crystalfontz.c Cwlinux.c HD44780.c M50530.c T6963.c USBLCD.c drv_MatrixOrbital.c MatrixOrbital.c MilfordInstruments.c PalmPilot.c Raster.c SIN.c XWindow.c Text.c
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
-LTLIBRARIES = $(lib_LTLIBRARIES)
+bin_PROGRAMS = lcd4linux$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
DEFS = @DEFS@ -I. -I$(srcdir) -I.
X_LIBS = @X_LIBS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
-liblcd4linux_la_OBJECTS = display.lo drv.lo debug.lo cfg.lo lock.lo \
-pixmap.lo bar.lo icon.lo fontmap.lo udelay.lo
-bin_PROGRAMS = lcd4linux$(EXEEXT)
-PROGRAMS = $(bin_PROGRAMS)
-
lcd4linux_OBJECTS = lcd4linux.$(OBJEXT) pid.$(OBJEXT) parser.$(OBJEXT) \
-processor.$(OBJEXT) layout.$(OBJEXT) evaluator.$(OBJEXT) \
+processor.$(OBJEXT) layout.$(OBJEXT) timer.$(OBJEXT) \
+evaluator.$(OBJEXT) widget.$(OBJEXT) widget_text.$(OBJEXT) \
plugin.$(OBJEXT) plugin_math.$(OBJEXT) plugin_string.$(OBJEXT) \
plugin_cfg.$(OBJEXT) plugin_xmms.$(OBJEXT) plugin_i2c_sensors.$(OBJEXT) \
-widget.$(OBJEXT) widget_text.$(OBJEXT) system.$(OBJEXT) isdn.$(OBJEXT) \
-wifi.$(OBJEXT) mail.$(OBJEXT) seti.$(OBJEXT) battery.$(OBJEXT) \
-dvb.$(OBJEXT) filter.$(OBJEXT) exec.$(OBJEXT) expr.$(OBJEXT) \
-mail2.$(OBJEXT) socket.$(OBJEXT) imon.$(OBJEXT)
-lcd4linux_DEPENDENCIES = liblcd4linux.la
+system.$(OBJEXT) isdn.$(OBJEXT) wifi.$(OBJEXT) mail.$(OBJEXT) \
+seti.$(OBJEXT) battery.$(OBJEXT) dvb.$(OBJEXT) filter.$(OBJEXT) \
+exec.$(OBJEXT) expr.$(OBJEXT) mail2.$(OBJEXT) socket.$(OBJEXT) \
+imon.$(OBJEXT) display.$(OBJEXT) drv.$(OBJEXT) debug.$(OBJEXT) \
+cfg.$(OBJEXT) lock.$(OBJEXT) pixmap.$(OBJEXT) bar.$(OBJEXT) \
+icon.$(OBJEXT) fontmap.$(OBJEXT) udelay.$(OBJEXT)
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
.deps/plugin.P .deps/plugin_cfg.P .deps/plugin_i2c_sensors.P \
.deps/plugin_math.P .deps/plugin_string.P .deps/plugin_xmms.P \
.deps/processor.P .deps/seti.P .deps/socket.P .deps/system.P \
-.deps/udelay.P .deps/widget.P .deps/widget_text.P .deps/wifi.P
-SOURCES = $(liblcd4linux_la_SOURCES) $(lcd4linux_SOURCES) $(EXTRA_lcd4linux_SOURCES)
-OBJECTS = $(liblcd4linux_la_OBJECTS) $(lcd4linux_OBJECTS)
+.deps/timer.P .deps/udelay.P .deps/widget.P .deps/widget_text.P \
+.deps/wifi.P
+SOURCES = $(lcd4linux_SOURCES) $(EXTRA_lcd4linux_SOURCES)
+OBJECTS = $(lcd4linux_OBJECTS)
all: all-redirect
.SUFFIXES:
maintainer-clean-hdr:
-mostlyclean-libLTLIBRARIES:
+mostlyclean-binPROGRAMS:
-clean-libLTLIBRARIES:
- -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-distclean-libLTLIBRARIES:
+distclean-binPROGRAMS:
-maintainer-clean-libLTLIBRARIES:
+maintainer-clean-binPROGRAMS:
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(libdir)
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
- echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
- $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
-uninstall-libLTLIBRARIES:
+uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
- list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
+ list='$(bin_PROGRAMS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
done
# FIXME: We should only use cygpath when building on Windows,
maintainer-clean-libtool:
-liblcd4linux.la: $(liblcd4linux_la_OBJECTS) $(liblcd4linux_la_DEPENDENCIES)
- $(LINK) -rpath $(libdir) $(liblcd4linux_la_LDFLAGS) $(liblcd4linux_la_OBJECTS) $(liblcd4linux_la_LIBADD) $(LIBS)
-
-mostlyclean-binPROGRAMS:
-
-clean-binPROGRAMS:
- -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-
-distclean-binPROGRAMS:
-
-maintainer-clean-binPROGRAMS:
-
-install-binPROGRAMS: $(bin_PROGRAMS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(bindir)
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
- else :; fi; \
- done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- list='$(bin_PROGRAMS)'; for p in $$list; do \
- rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
- done
-
lcd4linux$(EXEEXT): $(lcd4linux_OBJECTS) $(lcd4linux_DEPENDENCIES)
@rm -f lcd4linux$(EXEEXT)
$(LINK) $(lcd4linux_LDFLAGS) $(lcd4linux_OBJECTS) $(lcd4linux_LDADD) $(LIBS)
all-recursive-am: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
-install-exec-am: install-libLTLIBRARIES install-binPROGRAMS
+install-exec-am: install-binPROGRAMS
install-exec: install-exec-am
install-data-am:
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
-uninstall-am: uninstall-libLTLIBRARIES uninstall-binPROGRAMS
+uninstall-am: uninstall-binPROGRAMS
uninstall: uninstall-am
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) config.h
+all-am: Makefile $(PROGRAMS) config.h
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
- $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
mostlyclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-mostlyclean-am: mostlyclean-hdr mostlyclean-libLTLIBRARIES \
+mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \
mostlyclean-compile mostlyclean-libtool \
- mostlyclean-binPROGRAMS mostlyclean-tags \
- mostlyclean-depend mostlyclean-generic
+ mostlyclean-tags mostlyclean-depend mostlyclean-generic
mostlyclean: mostlyclean-am
-clean-am: clean-hdr clean-libLTLIBRARIES clean-compile clean-libtool \
- clean-binPROGRAMS clean-tags clean-depend clean-generic \
- mostlyclean-am
+clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-libtool \
+ clean-tags clean-depend clean-generic mostlyclean-am
clean: clean-am
-distclean-am: distclean-hdr distclean-libLTLIBRARIES distclean-compile \
- distclean-libtool distclean-binPROGRAMS distclean-tags \
- distclean-depend distclean-generic clean-am
+distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile \
+ distclean-libtool distclean-tags distclean-depend \
+ distclean-generic clean-am
-rm -f libtool
distclean: distclean-am
-rm -f config.status
-maintainer-clean-am: maintainer-clean-hdr \
- maintainer-clean-libLTLIBRARIES \
+maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \
maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-binPROGRAMS maintainer-clean-tags \
- maintainer-clean-depend maintainer-clean-generic \
- distclean-am
+ maintainer-clean-tags maintainer-clean-depend \
+ maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
-rm -f config.status
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
-mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
-clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
-uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
-distclean-compile clean-compile maintainer-clean-compile \
-mostlyclean-libtool distclean-libtool clean-libtool \
-maintainer-clean-libtool mostlyclean-binPROGRAMS distclean-binPROGRAMS \
-clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS \
-install-binPROGRAMS tags mostlyclean-tags distclean-tags clean-tags \
-maintainer-clean-tags distdir mostlyclean-depend distclean-depend \
-clean-depend maintainer-clean-depend info-am info dvi-am dvi check \
-check-am installcheck-am installcheck all-recursive-am install-exec-am \
+mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir \
+mostlyclean-depend distclean-depend clean-depend \
+maintainer-clean-depend info-am info dvi-am dvi check check-am \
+installcheck-am installcheck all-recursive-am install-exec-am \
install-exec install-data-am install-data install-am install \
uninstall-am uninstall all-redirect all-am all installdirs \
mostlyclean-generic distclean-generic clean-generic \
PARPORT="no"
if test "$BECKMANNEGLE" = "yes"; then
- DRIVERS="$DRIVERS BeckmannEgle.lo"
+# DRIVERS="$DRIVERS BeckmannEgle.lo"
+ DRIVERS="$DRIVERS BeckmannEgle.o"
cat >>confdefs.h <<\_ACEOF
#define WITH_BECKMANNEGLE 1
fi
if test "$CRYSTALFONTZ" = "yes"; then
- DRIVERS="$DRIVERS Crystalfontz.lo"
+# DRIVERS="$DRIVERS Crystalfontz.lo"
+ DRIVERS="$DRIVERS Crystalfontz.o"
cat >>confdefs.h <<\_ACEOF
#define WITH_CRYSTALFONTZ 1
fi
if test "$CWLINUX" = "yes"; then
- DRIVERS="$DRIVERS Cwlinux.lo"
+# DRIVERS="$DRIVERS Cwlinux.lo"
+ DRIVERS="$DRIVERS Cwlinux.o"
cat >>confdefs.h <<\_ACEOF
#define WITH_CWLINUX 1
if test "$HD44780" = "yes"; then
PARPORT="yes"
- DRIVERS="$DRIVERS HD44780.lo"
+# DRIVERS="$DRIVERS HD44780.lo"
+ DRIVERS="$DRIVERS HD44780.o"
cat >>confdefs.h <<\_ACEOF
#define WITH_HD44780 1
if test "$M50530" = "yes"; then
PARPORT="yes"
- DRIVERS="$DRIVERS M50530.lo"
+# DRIVERS="$DRIVERS M50530.lo"
+ DRIVERS="$DRIVERS M50530.o"
cat >>confdefs.h <<\_ACEOF
#define WITH_M50530 1
if test "$T6963" = "yes"; then
PARPORT="yes"
- DRIVERS="$DRIVERS T6963.lo"
+# DRIVERS="$DRIVERS T6963.lo"
+ DRIVERS="$DRIVERS T6963.o"
cat >>confdefs.h <<\_ACEOF
#define WITH_T6963 1
fi
if test "$USBLCD" = "yes"; then
- DRIVERS="$DRIVERS USBLCD.lo"
+# DRIVERS="$DRIVERS USBLCD.lo"
+ DRIVERS="$DRIVERS USBLCD.o"
cat >>confdefs.h <<\_ACEOF
#define WITH_USBLCD 1
fi
if test "$MATRIXORBITAL" = "yes"; then
- DRIVERS="$DRIVERS MatrixOrbital.lo drv_MatrixOrbital.lo"
+# DRIVERS="$DRIVERS MatrixOrbital.lo drv_MatrixOrbital.lo"
+ DRIVERS="$DRIVERS MatrixOrbital.o drv_MatrixOrbital.o"
cat >>confdefs.h <<\_ACEOF
#define WITH_MATRIXORBITAL 1
fi
if test "$MILINST" = "yes"; then
- DRIVERS="$DRIVERS MilfordInstruments.lo"
+# DRIVERS="$DRIVERS MilfordInstruments.lo"
+ DRIVERS="$DRIVERS MilfordInstruments.o"
cat >>confdefs.h <<\_ACEOF
#define WITH_MILINST 1
fi
if test "$PALMPILOT" = "yes"; then
- DRIVERS="$DRIVERS PalmPilot.lo"
+# DRIVERS="$DRIVERS PalmPilot.lo"
+ DRIVERS="$DRIVERS PalmPilot.o"
cat >>confdefs.h <<\_ACEOF
#define WITH_PALMPILOT 1
fi
if test "$SIN" = "yes"; then
- DRIVERS="$DRIVERS SIN.lo"
+# DRIVERS="$DRIVERS SIN.lo"
+ DRIVERS="$DRIVERS SIN.o"
cat >>confdefs.h <<\_ACEOF
#define WITH_SIN 1
fi
if test "$SKELETON" = "yes"; then
- DRIVERS="$DRIVERS Skeleton.lo"
+# DRIVERS="$DRIVERS Skeleton.lo"
+ DRIVERS="$DRIVERS Skeleton.o"
cat >>confdefs.h <<\_ACEOF
#define WITH_SKELETON 1
if test "$TEXT" = "yes"; then
if test "$has_curses" = true; then
- DRIVERS="$DRIVERS Text.lo"
+# DRIVERS="$DRIVERS Text.lo"
+ DRIVERS="$DRIVERS Text.o"
DRVLIBS="$DRVLIBS $CURSES_LIBS"
CPPFLAGS="$CPPFLAGS $CURSES_INCLUDES"
echo "$as_me: error: X11 headers or libraries not available: X11 driver disabled" >&2;}
{ (exit 1); exit 1; }; }
else
- DRIVERS="$DRIVERS XWindow.lo"
+# DRIVERS="$DRIVERS XWindow.lo"
+ DRIVERS="$DRIVERS XWindow.o"
DRVLIBS="$DRVLIBS -L$ac_x_libraries -lX11"
cat >>confdefs.h <<\_ACEOF
fi
# Raster.lo depends on PPM or PNG
+ Raster.lo depends on PPM or NG
if test "$RASTER" = "yes"; then
- DRIVERS="$DRIVERS Raster.lo"
+# DRIVERS="$DRIVERS Raster.lo"
+ DRIVERS="$DRIVERS Raster.o"
fi
# parport driver
if test "$PARPORT" = "yes"; then
- DRIVERS="$DRIVERS parport.lo"
+# DRIVERS="$DRIVERS parport.lo"
+ DRIVERS="$DRIVERS parport.o"
fi
PARPORT="no"
if test "$BECKMANNEGLE" = "yes"; then
- DRIVERS="$DRIVERS BeckmannEgle.lo"
+# DRIVERS="$DRIVERS BeckmannEgle.lo"
+ DRIVERS="$DRIVERS BeckmannEgle.o"
AC_DEFINE(WITH_BECKMANNEGLE,1,[junk])
fi
if test "$CRYSTALFONTZ" = "yes"; then
- DRIVERS="$DRIVERS Crystalfontz.lo"
+# DRIVERS="$DRIVERS Crystalfontz.lo"
+ DRIVERS="$DRIVERS Crystalfontz.o"
AC_DEFINE(WITH_CRYSTALFONTZ,1,[junk])
fi
if test "$CWLINUX" = "yes"; then
- DRIVERS="$DRIVERS Cwlinux.lo"
+# DRIVERS="$DRIVERS Cwlinux.lo"
+ DRIVERS="$DRIVERS Cwlinux.o"
AC_DEFINE(WITH_CWLINUX,1,[junk])
fi
if test "$HD44780" = "yes"; then
PARPORT="yes"
- DRIVERS="$DRIVERS HD44780.lo"
+# DRIVERS="$DRIVERS HD44780.lo"
+ DRIVERS="$DRIVERS HD44780.o"
AC_DEFINE(WITH_HD44780,1,[junk])
fi
if test "$M50530" = "yes"; then
PARPORT="yes"
- DRIVERS="$DRIVERS M50530.lo"
+# DRIVERS="$DRIVERS M50530.lo"
+ DRIVERS="$DRIVERS M50530.o"
AC_DEFINE(WITH_M50530,1,[junk])
fi
if test "$T6963" = "yes"; then
PARPORT="yes"
- DRIVERS="$DRIVERS T6963.lo"
+# DRIVERS="$DRIVERS T6963.lo"
+ DRIVERS="$DRIVERS T6963.o"
AC_DEFINE(WITH_T6963,1,[junk])
fi
if test "$USBLCD" = "yes"; then
- DRIVERS="$DRIVERS USBLCD.lo"
+# DRIVERS="$DRIVERS USBLCD.lo"
+ DRIVERS="$DRIVERS USBLCD.o"
AC_DEFINE(WITH_USBLCD,1,[junk])
fi
if test "$MATRIXORBITAL" = "yes"; then
- DRIVERS="$DRIVERS MatrixOrbital.lo drv_MatrixOrbital.lo"
+# DRIVERS="$DRIVERS MatrixOrbital.lo drv_MatrixOrbital.lo"
+ DRIVERS="$DRIVERS MatrixOrbital.o drv_MatrixOrbital.o"
AC_DEFINE(WITH_MATRIXORBITAL,1,[junk])
fi
if test "$MILINST" = "yes"; then
- DRIVERS="$DRIVERS MilfordInstruments.lo"
+# DRIVERS="$DRIVERS MilfordInstruments.lo"
+ DRIVERS="$DRIVERS MilfordInstruments.o"
AC_DEFINE(WITH_MILINST,1,[junk])
fi
if test "$PALMPILOT" = "yes"; then
- DRIVERS="$DRIVERS PalmPilot.lo"
+# DRIVERS="$DRIVERS PalmPilot.lo"
+ DRIVERS="$DRIVERS PalmPilot.o"
AC_DEFINE(WITH_PALMPILOT,1,[junk])
fi
fi
if test "$SIN" = "yes"; then
- DRIVERS="$DRIVERS SIN.lo"
+# DRIVERS="$DRIVERS SIN.lo"
+ DRIVERS="$DRIVERS SIN.o"
AC_DEFINE(WITH_SIN,1,[junk])
fi
if test "$SKELETON" = "yes"; then
- DRIVERS="$DRIVERS Skeleton.lo"
+# DRIVERS="$DRIVERS Skeleton.lo"
+ DRIVERS="$DRIVERS Skeleton.o"
AC_DEFINE(WITH_SKELETON,1,[junk])
fi
if test "$TEXT" = "yes"; then
if test "$has_curses" = true; then
- DRIVERS="$DRIVERS Text.lo"
+# DRIVERS="$DRIVERS Text.lo"
+ DRIVERS="$DRIVERS Text.o"
DRVLIBS="$DRVLIBS $CURSES_LIBS"
CPPFLAGS="$CPPFLAGS $CURSES_INCLUDES"
AC_DEFINE(WITH_TEXT,1,[junk])
if test "$no_x" = "yes"; then
AC_MSG_ERROR(X11 headers or libraries not available: X11 driver disabled)
else
- DRIVERS="$DRIVERS XWindow.lo"
+# DRIVERS="$DRIVERS XWindow.lo"
+ DRIVERS="$DRIVERS XWindow.o"
DRVLIBS="$DRVLIBS -L$ac_x_libraries -lX11"
AC_DEFINE(WITH_X11,1,[junk])
fi
fi
# Raster.lo depends on PPM or PNG
+ Raster.lo depends on PPM or NG
if test "$RASTER" = "yes"; then
- DRIVERS="$DRIVERS Raster.lo"
+# DRIVERS="$DRIVERS Raster.lo"
+ DRIVERS="$DRIVERS Raster.o"
fi
# parport driver
if test "$PARPORT" = "yes"; then
- DRIVERS="$DRIVERS parport.lo"
+# DRIVERS="$DRIVERS parport.lo"
+ DRIVERS="$DRIVERS parport.o"
fi
AC_SUBST(DRIVERS)
-/* $Id: layout.c,v 1.4 2004/01/12 03:51:01 reinelt Exp $
+/* $Id: layout.c,v 1.5 2004/01/13 08:18:19 reinelt Exp $
*
* new layouter framework
*
*
*
* $Log: layout.c,v $
+ * Revision 1.5 2004/01/13 08:18:19 reinelt
+ * timer queues added
+ * liblcd4linux deactivated turing transformation to new layout
+ *
* Revision 1.4 2004/01/12 03:51:01 reinelt
* evaluating the 'Variables' section in the config file
*
{
// allocate widget
widget_add (name);
-
+
+ return 0;
}
-/* $Id: lcd4linux.c,v 1.59 2004/01/12 03:51:01 reinelt Exp $
+/* $Id: lcd4linux.c,v 1.60 2004/01/13 08:18:19 reinelt Exp $
*
* LCD4Linux
*
*
*
* $Log: lcd4linux.c,v $
+ * Revision 1.60 2004/01/13 08:18:19 reinelt
+ * timer queues added
+ * liblcd4linux deactivated turing transformation to new layout
+ *
* Revision 1.59 2004/01/12 03:51:01 reinelt
* evaluating the 'Variables' section in the config file
*
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
+#include <time.h>
#include "cfg.h"
#include "debug.h"
#include "udelay.h"
#include "display.h" // Fixme: remove me...
#include "drv.h"
-#include "processor.h"
+#include "processor.h" // Fixme: remove me...
+#include "timer.h"
#include "layout.h"
#include "plugin.h"
process ();
usleep(tack*1000);
}
+ } else {
+ while (got_signal==0) {
+ struct timespec delay;
+ if (timer_process(&delay)<0) break;
+ nanosleep(&delay, NULL);
+ }
}
debug ("leaving main loop");
-/* $Id: parport.c,v 1.12 2004/01/09 04:16:06 reinelt Exp $
+/* $Id: parport.c,v 1.13 2004/01/13 08:18:20 reinelt Exp $
*
* generic parallel port handling
*
*
*
* $Log: parport.c,v $
+ * Revision 1.13 2004/01/13 08:18:20 reinelt
+ * timer queues added
+ * liblcd4linux deactivated turing transformation to new layout
+ *
* Revision 1.12 2004/01/09 04:16:06 reinelt
* added 'section' argument to cfg_get(), but NULLed it on all calls by now.
*
}
#if 0
- // Fixme
+ // Fixme: this always fails here...
if (ioctl(PPfd, PPEXCL)) {
debug ("ioctl(%s, PPEXCL) failed: %s", PPdev, strerror(errno));
} else {
--- /dev/null
+/* $Id: timer.c,v 1.1 2004/01/13 08:18:20 reinelt Exp $
+ *
+ * generic timer handling
+ *
+ * Copyright 2003,2004 Michael Reinelt <reinelt@eunet.at>
+ * Copyright 2004 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *
+ * $Log: timer.c,v $
+ * Revision 1.1 2004/01/13 08:18:20 reinelt
+ * timer queues added
+ * liblcd4linux deactivated turing transformation to new layout
+ *
+ */
+
+/*
+ * exported functions:
+ *
+ * int timer_junk(void)
+ * Fixme: document me :-(
+ *
+ */
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <time.h>
+
+#include "debug.h"
+#include "cfg.h"
+#include "timer.h"
+
+
+typedef struct TIMER {
+ void (*callback)(void *data);
+ void *data;
+ struct timeval when;
+ int interval;
+ int one_shot;
+ int active;
+} TIMER;
+
+
+TIMER *Timers=NULL;
+int nTimers=0;
+
+
+static void timer_inc (struct timeval *tv, int msec)
+{
+ tv->tv_sec += msec / 1000;
+ tv->tv_usec += (msec - 1000*(msec/1000)) * 1000;
+
+ if (tv->tv_usec >= 1000000) {
+ tv->tv_usec -= 1000000;
+ tv->tv_sec++;
+ }
+}
+
+
+int timer_add (void (*callback)(void *data), void *data, int interval, int one_shot)
+{
+ int i;
+ struct timeval now;
+
+ gettimeofday(&now, NULL);
+
+ // find a free slot
+ for (i=0; i<nTimers; i++) {
+ if (Timers[i].active==0) break;
+ }
+
+ // none found, allocate a new slot
+ if (i>=nTimers) {
+ nTimers++;
+ Timers=realloc(Timers, nTimers*sizeof(*Timers));
+ }
+
+ // fill slot
+ Timers[i].callback = callback;
+ Timers[i].data = data;
+ Timers[i].when = now;
+ Timers[i].interval = interval;
+ Timers[i].one_shot = one_shot;
+ Timers[i].active = 1;
+
+ // if one-shot timer, don't fire now
+ if (one_shot) {
+ timer_inc (&Timers[i].when, interval);
+ }
+
+ return 0;
+}
+
+
+int timer_process (struct timespec *delay)
+{
+ int i, flag, min;
+ struct timeval now;
+
+ // the current moment
+ gettimeofday(&now, NULL);
+
+ // sanity check
+ if (nTimers==0) {
+ error ("huh? not one single timer to process? dazed and confused...");
+ return -1;
+ }
+
+ // process expired timers
+ flag=0;
+ for (i=0; i<nTimers; i++) {
+ if (Timers[i].active == 0) continue;
+ if (timercmp(&Timers[i].when, &now, <=)) {
+ flag=1;
+ // callback
+ if (Timers[i].callback!=NULL) {
+ Timers[i].callback(Timers[i].data);
+ }
+ // respawn or delete timer
+ if (Timers[i].one_shot) {
+ Timers[i].active=0;
+ } else {
+ Timers[i].when=now;
+ timer_inc (&Timers[i].when, Timers[i].interval);
+ }
+ }
+ }
+
+ if (flag) {
+ // Fixme: if at least one timer has been processed, do a flush()
+
+ }
+
+ // find next timer
+ flag=1;
+ min=-1;
+ for (i=0; i<nTimers; i++) {
+ if (Timers[i].active == 0) continue;
+ if (flag || timercmp(&Timers[i].when, &Timers[min].when, <)) {
+ flag=0;
+ min=i;
+ }
+ }
+
+ if (min<0) {
+ error ("huh? not one single timer left? dazed and confused...");
+ return -1;
+ }
+
+ // delay until next timer event
+ delay->tv_sec = Timers[min].when.tv_sec - now.tv_sec;
+ delay->tv_nsec = Timers[min].when.tv_usec - now.tv_usec;
+ if (delay->tv_nsec<0) {
+ delay->tv_sec--;
+ delay->tv_nsec += 1000000;
+ }
+ // nanoseconds!!
+ delay->tv_nsec *= 1000;
+
+ return 0;
+
+}
--- /dev/null
+/* $Id: timer.h,v 1.1 2004/01/13 08:18:20 reinelt Exp $
+ *
+ * generic timer handling
+ *
+ * Copyright 2003,2004 Michael Reinelt <reinelt@eunet.at>
+ * Copyright 2004 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net>
+ *
+ * This file is part of LCD4Linux.
+ *
+ * LCD4Linux is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * LCD4Linux is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *
+ * $Log: timer.h,v $
+ * Revision 1.1 2004/01/13 08:18:20 reinelt
+ * timer queues added
+ * liblcd4linux deactivated turing transformation to new layout
+ *
+ */
+
+
+#ifndef _TIMER_H_
+#define _TIMER_H_
+
+int timer_add (void(*callback)(void *data), void *data, int interval, int one_shot);
+int timer_process (struct timespec *delay);
+
+#endif
-/* $Id: widget.c,v 1.6 2004/01/11 18:26:02 reinelt Exp $
+/* $Id: widget.c,v 1.7 2004/01/13 08:18:20 reinelt Exp $
*
* generic widget handling
*
*
*
* $Log: widget.c,v $
+ * Revision 1.7 2004/01/13 08:18:20 reinelt
+ * timer queues added
+ * liblcd4linux deactivated turing transformation to new layout
+ *
* Revision 1.6 2004/01/11 18:26:02 reinelt
* further widget and layout processing
*
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <errno.h>
#include "debug.h"
#include "cfg.h"
#include "widget.h"
+// we use a static array of widgets and not realloc()
+#define MAX_WIDGETS 256
+
static WIDGET_CLASS *Classes=NULL;
static int nClasses=0;
static WIDGET *Widgets=NULL;
static int nWidgets=0;
+static int widget_added=0;
int widget_register (WIDGET_CLASS *widget)
{
int i;
+ // sanity check: disallow widget registering after at least one
+ // widget has been added, because we use realloc here, and there may
+ // be pointers to the old memory area
+ if (widget_added) {
+ error ("internal error: register_widget(%s) after add_widget()", widget->name);
+ return -1;
+ }
+
for (i=0; i<nClasses; i++) {
if (strcasecmp(widget->name, Classes[i].name)==0) {
- error ("internal error: widget '%s' already exists!");
+ error ("internal error: widget '%s' already exists!", widget->name);
return -1;
}
}
}
// lookup widget class
+ Class=NULL;
for (i=0; i<nClasses; i++) {
if (strcasecmp(class, Classes[i].name)==0) {
Class=&(Classes[i]);
return -1;
}
+ // do NOT use realloc here because there may be pointers to the old
+ // memory area, which would point to nirvana if realloc moves the area
+ if (Widgets==NULL) {
+ Widgets=malloc(MAX_WIDGETS*sizeof(WIDGET));
+ if (Widgets==NULL) {
+ error ("internal error: allocation of widget buffer failed: %s", strerror(errno));
+ return -1;
+ }
+ }
+
+ // another sanity check
+ if (nWidgets>=MAX_WIDGETS) {
+ error ("internal error: widget buffer full!");
+ return -1;
+ }
+
+ Widget=&(Widgets[nWidgets]);
nWidgets++;
- Widgets=realloc(Widgets, nWidgets*sizeof(WIDGET));
- Widget=&(Widgets[nWidgets-1]);
Widget->name = name;
Widget->class = Class;
-/* $Id: widget.h,v 1.5 2004/01/11 18:26:02 reinelt Exp $
+/* $Id: widget.h,v 1.6 2004/01/13 08:18:20 reinelt Exp $
*
* generic widget handling
*
*
*
* $Log: widget.h,v $
+ * Revision 1.6 2004/01/13 08:18:20 reinelt
+ * timer queues added
+ * liblcd4linux deactivated turing transformation to new layout
+ *
* Revision 1.5 2004/01/11 18:26:02 reinelt
* further widget and layout processing
*
int widget_register (WIDGET_CLASS *widget);
+int widget_add (char *name);
// some basic widgets
-/* $Id: widget_text.c,v 1.2 2004/01/11 18:26:02 reinelt Exp $
+/* $Id: widget_text.c,v 1.3 2004/01/13 08:18:20 reinelt Exp $
*
* simple text widget handling
*
*
*
* $Log: widget_text.c,v $
+ * Revision 1.3 2004/01/13 08:18:20 reinelt
+ * timer queues added
+ * liblcd4linux deactivated turing transformation to new layout
+ *
* Revision 1.2 2004/01/11 18:26:02 reinelt
* further widget and layout processing
*
#include "debug.h"
#include "cfg.h"
+#include "timer.h"
#include "widget.h"
} WIDGET_TEXT;
+void widget_text_callback (void *vSelf)
+{
+ WIDGET *Self=(WIDGET*)vSelf;
+
+ debug ("callback: Self->name=%s", Self->name);
+}
+
+
int widget_text_init (WIDGET *Self) {
char *section;
WIDGET_TEXT *data;
- debug ("Michi: widget_text_init(%s)", Self->name);
-
// prepare config section
// strlen("Widget:")=7
section=malloc(strlen(Self->name)+8);
free (section);
Self->data=data;
+ debug ("timer_add: Self=%p Self->name=%s", Self, Self->name);
+ timer_add (widget_text_callback, Self, 200, 0);
return 0;
}