* configure.in: added missing mcs51 in status output
[fw/sdcc] / sim / ucsim / cmd.src / Makefile.in
index 09344f23d3deaee55a4c115a4521ada871a0b589..e6f72fab4960f65450c15c33bbbc9b854596adcc 100644 (file)
@@ -1,5 +1,5 @@
 #
-# S51 mcs51/Makefile
+# ucsim cmd.src/Makefile
 #
 # (c) Drotos Daniel, Talker Bt. 1997
 #
@@ -13,30 +13,47 @@ CXXCPP              = @CXXCPP@
 RANLIB         = @RANLIB@
 INSTALL                = @INSTALL@
 
-PRJDIR         = ..
+LEX            = @LEX@
+YACC           = @YACC@
+BISON_PLUS_PLUS        = @BISON_PLUS_PLUS@
+
+top_builddir   = @top_builddir@
+top_srcdir     = @top_srcdir@
 
 DEFS            = $(subs -DHAVE_CONFIG_H,,@DEFS@)
-CPPFLAGS        = @CPPFLAGS@ -I. -I$(PRJDIR) \
-                 -I$(PRJDIR)/sim.src
+CPPFLAGS        = @CPPFLAGS@ -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) \
+                 -I$(top_srcdir)/sim.src -I$(top_srcdir)/gui.src
 CFLAGS          = @CFLAGS@ -Wall
 CXXFLAGS        = @CXXFLAGS@ -Wall
 M_OR_MM         = @M_OR_MM@
+WINSOCK_AVAIL  = @WINSOCK_AVAIL@
 
 prefix          = @prefix@
 exec_prefix     = @exec_prefix@
 bindir          = @bindir@
 libdir          = @libdir@
 datadir         = @datadir@
+datarootdir     = @datarootdir@
 includedir      = @includedir@
 mandir          = @mandir@
 man1dir         = $(mandir)/man1
 man2dir         = $(mandir)/man2
 infodir         = @infodir@
 srcdir          = @srcdir@
+VPATH           = @srcdir@
+
+OBJECTS                = cmdset.o command.o cmdutil.o syntax.o \
+                 get.o set.o timer.o bp.o info.o show.o cmdgui.o cmdconf.o \
+                 cmduc.o cmdstat.o cmdmem.o \
+                 cmdpars.o cmdlex.o newcmd.o
 
-OBJECTS                = newcmd.o cmdutil.o cmdset.o syntax.o \
-                 get.o set.o timer.o bp.o info.o
+ifeq ($(WINSOCK_AVAIL), 1)
+OBJECTS += newcmdwin32.o
+else
+OBJECTS += newcmdposix.o
+endif
 
+DEVEL          = $(shell ( bash -c "test -e $(top_builddir)/devel && echo yes" ))
 
 # Compiling entire program or any subproject
 # ------------------------------------------
@@ -59,6 +76,8 @@ uninstall:
 # --------------------
 check:
 
+test:
+
 
 # Performing installation test
 # ----------------------------
@@ -74,44 +93,52 @@ installdirs:
 # ---------------------
 dep: Makefile.dep
 
-Makefile.dep: *.cc *.h
-       $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
+Makefile.dep: $(srcdir)/*.cc $(srcdir)/*.h
+       $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(addprefix $(srcdir)/, $(OBJECTS:.o=.cc)) >Makefile.dep
 
 include Makefile.dep
-include clean.mk
+include $(srcdir)/clean.mk
 
-#parser.cc: parser.y
+cmdpars.cc: cmdpars.y
 
-#plex.cc: plex.l
+ifeq ($(DEVEL),yes)
+  cmdlex.cc: cmdlex.l cmdpars.h
+endif
 
 # My rules
 # --------
 
-cmdlib: $(PRJDIR)/libcmd.a
+cmdlib: $(top_builddir)/libcmd.a
 
-$(PRJDIR)/libcmd.a: $(OBJECTS)
+$(top_builddir)/libcmd.a: $(OBJECTS)
        ar -rcu $*.a $(OBJECTS)
        $(RANLIB) $*.a
 
 .cc.o:
        $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
 
+#.y.cc:
+#      rm -f $*.cc $*.h
+#      $(YACC) -d $<
+#      mv y.tab.c $*.cc
+#      mv y.tab.h $*.h
+
+ifeq ($(DEVEL),yes)
 .y.cc:
        rm -f $*.cc $*.h
-       $(YACC) -d $<
-       mv y.tab.c $*.cc
-       mv y.tab.h $*.h
+       $(BISON_PLUS_PLUS) -d -o $*.cc $<
 
 .l.cc:
        rm -f $*.cc
-       $(LEX) -t $< >$*.cc
+       $(LEX) --c++ -o $*.cc $<
+endif
 
 
 # Remaking configuration
 # ----------------------
 checkconf:
-       @if [ -f $(PRJDIR)/devel ]; then\
-         $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
+       @if [ -f $(top_builddir)/devel ]; then\
+         $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
        fi
 
-# End of mcs51/Makefile.in
+# End of cmd.src/Makefile.in