X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=sim%2Fucsim%2Fxa.src%2FMakefile.in;h=9112a6f491023f5692678494ec5f050f374bcc10;hb=011a73edf0a9ef1e9c50cdf01c94050bbfc70bdf;hp=56e5fd09109012d66e899a9ae9f4750db0505bb3;hpb=0e1bba0730e55b3d40c1c644d94befc99c87270d;p=fw%2Fsdcc diff --git a/sim/ucsim/xa.src/Makefile.in b/sim/ucsim/xa.src/Makefile.in index 56e5fd09..9112a6f4 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 -lutil -lcmd -lguiucsim +LIBS = @LIBS@ -L$(top_builddir) -lsim -lutil -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