X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=sim%2Fucsim%2Fcmd.src%2FMakefile.in;h=73777ca855adb7bff98dda8bde2690ba9f888027;hb=2445815caa572f0151cbb551b2d7b55ef95786ba;hp=3edbab35dcc9ff47d7e6d1e0f48b0fcbdfed23a3;hpb=fbbba4a83cab40dd3baff79ec60a619b13dffdce;p=fw%2Fsdcc diff --git a/sim/ucsim/cmd.src/Makefile.in b/sim/ucsim/cmd.src/Makefile.in index 3edbab35..73777ca8 100644 --- a/sim/ucsim/cmd.src/Makefile.in +++ b/sim/ucsim/cmd.src/Makefile.in @@ -13,11 +13,16 @@ 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 -I$(PRJDIR)/gui.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@ @@ -33,11 +38,14 @@ man1dir = $(mandir)/man1 man2dir = $(mandir)/man2 infodir = @infodir@ srcdir = @srcdir@ +VPATH = @srcdir@ -OBJECTS = cmdset.o newcmd.o cmdutil.o syntax.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 + cmduc.o cmdstat.o cmdmem.o \ + cmdpars.o cmdlex.o +DEVEL = $(shell ( bash -c "test -e $(top_builddir)devel && echo yes" )) # Compiling entire program or any subproject # ------------------------------------------ @@ -60,6 +68,8 @@ uninstall: # -------------------- check: +test: + # Performing installation test # ---------------------------- @@ -75,44 +85,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) $(filter %.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) - $(AR) -rcu $*.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 cmd.src/Makefile.in