X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=sim%2Fucsim%2Fxa.src%2FMakefile.in;h=90529f2688e6b8f3a42040158d64b864c53ead2e;hb=2738d56c6c0b57108f9f1bb7bb5449c84fcaefda;hp=d5a6d64abb8d31d537724bba9f61a5d1044e8341;hpb=8c8f34ff4281a55d2f535335c02999246e9e12f2;p=fw%2Fsdcc diff --git a/sim/ucsim/xa.src/Makefile.in b/sim/ucsim/xa.src/Makefile.in index d5a6d64a..90529f26 100644 --- a/sim/ucsim/xa.src/Makefile.in +++ b/sim/ucsim/xa.src/Makefile.in @@ -12,29 +12,37 @@ CPP = @CPP@ CXXCPP = @CXXCPP@ RANLIB = @RANLIB@ INSTALL = @INSTALL@ +STRIP = @STRIP@ -PRJDIR = .. +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +EXEEXT = @EXEEXT@ DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@) -CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \ - -I$(PRJDIR)/cmd.src -I$(PRJDIR)/sim.src -I$(PRJDIR)/gui.src +CPPFLAGS = @CPPFLAGS@ -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) \ + -I$(top_srcdir)/cmd.src -I$(top_srcdir)/sim.src \ + -I$(top_srcdir)/gui.src CFLAGS = @CFLAGS@ -Wall CXXFLAGS = @CXXFLAGS@ -Wall +LDFLAGS = @LDFLAGS@ M_OR_MM = @M_OR_MM@ -LIBS = @LIBS@ -L$(PRJDIR) -lsim -lcmd -lutil -lguiucsim +LIBS = @LIBS@ -L$(top_builddir) -lsim -lucsimutil -lguiucsim -lcmd -lsim 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 = sxa.o glob.o \ inst.o \ @@ -55,13 +63,14 @@ tests: $(TEST_OBJ) # Compiling and installing everything and runing test # --------------------------------------------------- install: all installdirs - $(INSTALL) -s sxa $(bindir) + $(INSTALL) sxa$(EXEEXT) $(DESTDIR)$(bindir)/sxa$(EXEEXT) + $(STRIP) $(DESTDIR)$(bindir)/sxa$(EXEEXT) # Deleting all the installed files # -------------------------------- uninstall: - rm -f $(bindir)/sxa + rm -f $(DESTDIR)$(bindir)/sxa$(EXEEXT) # Performing self-test @@ -77,31 +86,31 @@ installcheck: # Creating installation directories # --------------------------------- installdirs: - test -d $(bindir) || $(INSTALL) -d $(bindir) + test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir) # Creating dependencies # --------------------- 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 Makefile.dep +include $(srcdir)/clean.mk # My rules # -------- .SUFFIXES: .asm .hex -xa.src: sxa +xa.src: sxa$(EXEEXT) -sxa: $(OBJECTS) $(PRJDIR)/*.a - $(CXX) $(CXXFLAGS) -o sxa $(OBJECTS) $(LIBS) +sxa$(EXEEXT): $(OBJECTS) $(top_builddir)/*.a + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS) otherlibs: - cd $(PRJDIR)/cmd.src && $(MAKE) all - cd $(PRJDIR)/sim.src && $(MAKE) all + $(MAKE) -C $(top_builddir)/cmd.src all + $(MAKE) -C $(top_builddir)/sim.src all .cc.o: $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ @@ -113,8 +122,8 @@ otherlibs: # 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 $(srcdir)/conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\ fi # End of xa.src/Makefile.in