* device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
[fw/sdcc] / sim / ucsim / s51.src / Makefile.in
index 89a45c9e3d5648978a50f1c93322a3c31a13f08d..5f4ec97fac6f62dbb0f3acafdf3b3e77755dda1a 100644 (file)
@@ -29,7 +29,7 @@ SDCC          = sdcc
 SDCFLAGS       = --debug --stack-after-data --model-small
 SDCPPFLAGS     = 
 
-LIBS           = @LIBS@ -L$(PRJDIR) -lsim -lutil -lsim -lcmd -lguiucsim
+LIBS           = @LIBS@ -L$(PRJDIR) -Wl,--start-group -lutil -lsim -lcmd -lguiucsim -Wl,--end-group
 DL             = @DL@
 dl_ok          = @dl_ok@
 
@@ -45,7 +45,7 @@ man2dir         = $(mandir)/man2
 infodir         = @infodir@
 srcdir          = @srcdir@
 
-EXEEXT          = @EXEEXT@
+EXEEXT         = @EXEEXT@
 
 OBJECTS_SHARED = glob.o sim51.o \
                  inc.o jmp.o mov.o logic.o arith.o bit.o \
@@ -68,13 +68,13 @@ all: checkconf otherlibs s51.src
 # Compiling and installing everything and runing test
 # ---------------------------------------------------
 install: all installdirs
-       $(INSTALL) -s s51$(EXEEXT) $(bindir)
+       $(INSTALL) -s s51$(EXEEXT) $(DESTDIR)$(bindir)
 
 
 # Deleting all the installed files
 # --------------------------------
 uninstall:
-       rm -f $(bindir)/s51$(EXEEXT)
+       rm -f $(DESTDIR)$(bindir)/s51$(EXEEXT)
 
 
 # Performing self-test
@@ -94,7 +94,7 @@ installcheck:
 # Creating installation directories
 # ---------------------------------
 installdirs:
-       test -d $(bindir) || $(INSTALL) -d $(bindir)
+       test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir)
 
 
 # Creating dependencies
@@ -132,6 +132,7 @@ $(PRJDIR)/s51.so: $(OBJECTS_SHARED)
        $(CXX) -shared $(OBJECTS_SHARED) -o $@
 
 otherlibs:
+       cd $(PRJDIR) && $(MAKE) libs
        cd $(PRJDIR)/cmd.src && $(MAKE) all
        cd $(PRJDIR)/sim.src && $(MAKE) all
        $(MAKE) -C $(PRJDIR)/gui.src checkconf ucsim_lib