* sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
[fw/sdcc] / sim / ucsim / cmd.src / Makefile.in
index 09344f23d3deaee55a4c115a4521ada871a0b589..eaca51968b50736a88de21c5db0a7e1bf3b6d1a4 100644 (file)
@@ -1,5 +1,5 @@
 #
-# S51 mcs51/Makefile
+# ucsim cmd.src/Makefile
 #
 # (c) Drotos Daniel, Talker Bt. 1997
 #
@@ -13,11 +13,15 @@ CXXCPP              = @CXXCPP@
 RANLIB         = @RANLIB@
 INSTALL                = @INSTALL@
 
+LEX            = @LEX@
+YACC           = @YACC@
+BISON_PLUS_PLUS        = @BISON_PLUS_PLUS@
+
 PRJDIR         = ..
 
 DEFS            = $(subs -DHAVE_CONFIG_H,,@DEFS@)
 CPPFLAGS        = @CPPFLAGS@ -I. -I$(PRJDIR) \
-                 -I$(PRJDIR)/sim.src
+                 -I$(PRJDIR)/sim.src -I$(PRJDIR)/gui.src
 CFLAGS          = @CFLAGS@ -Wall
 CXXFLAGS        = @CXXFLAGS@ -Wall
 M_OR_MM         = @M_OR_MM@
@@ -34,9 +38,12 @@ man2dir         = $(mandir)/man2
 infodir         = @infodir@
 srcdir          = @srcdir@
 
-OBJECTS                = newcmd.o cmdutil.o cmdset.o syntax.o \
-                 get.o set.o timer.o bp.o info.o
+OBJECTS                = cmdset.o command.o newcmd.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
 
+DEVEL          = $(shell ( bash -c "test -e $(PRJDIR)/devel && echo yes" ))
 
 # Compiling entire program or any subproject
 # ------------------------------------------
@@ -59,6 +66,8 @@ uninstall:
 # --------------------
 check:
 
+test:
+
 
 # Performing installation test
 # ----------------------------
@@ -80,9 +89,11 @@ Makefile.dep: *.cc *.h
 include Makefile.dep
 include 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
 # --------
@@ -96,15 +107,21 @@ $(PRJDIR)/libcmd.a: $(OBJECTS)
 .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
+
 .y.cc:
        rm -f $*.cc $*.h
-       $(YACC) -d $<
-       mv y.tab.c $*.cc
-       mv y.tab.h $*.h
+       $(BISON_PLUS_PLUS) -d -o $*.cc $<
 
+ifeq ($(DEVEL),yes)
 .l.cc:
        rm -f $*.cc
-       $(LEX) -t $< >$*.cc
+       $(LEX) --c++ -o $*.cc $<
+endif
 
 
 # Remaking configuration
@@ -114,4 +131,4 @@ checkconf:
          $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
        fi
 
-# End of mcs51/Makefile.in
+# End of cmd.src/Makefile.in