* device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
[fw/sdcc] / sim / ucsim / z80.src / Makefile.in
index 8aed4371f08b92a44ff7f6b7dbc5f61fd23f26af..2f5077994cab30d071146aa820829ef304606318 100644 (file)
@@ -23,10 +23,10 @@ CXXFLAGS        = @CXXFLAGS@ -Wall
 M_OR_MM         = @M_OR_MM@
 PICOPT         = @PICOPT@
 SHAREDLIB      = @SHAREDLIB@
+EXEEXT         = @EXEEXT@
 
-EXEEXT          = @EXEEXT@
+LIBS           = @LIBS@ -L$(PRJDIR) -Wl,--start-group -lutil -lcmd -lsim -lguiucsim -Wl,--end-group
 
-LIBS           = @LIBS@ -L$(PRJDIR) -lutil -lsim -lutil -lcmd -lguiucsim
 DL             = @DL@
 dl_ok          = @dl_ok@
 
@@ -72,13 +72,13 @@ tests: $(TEST_OBJ)
 # Compiling and installing everything and runing test
 # ---------------------------------------------------
 install: all installdirs
-       $(INSTALL) -s sz80$(EXEEXT) $(bindir)
+       $(INSTALL) -s sz80$(EXEEXT) $(DESTDIR)$(bindir)
 
 
 # Deleting all the installed files
 # --------------------------------
 uninstall:
-       rm -f $(bindir)/sz80$(EXEEXT)
+       rm -f $(DESTDIR)$(bindir)/sz80$(EXEEXT)
 
 
 # Performing self-test
@@ -96,7 +96,7 @@ installcheck:
 # Creating installation directories
 # ---------------------------------
 installdirs:
-       test -d $(bindir) || $(INSTALL) -d $(bindir)
+       test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir)
 
 
 # Creating dependencies
@@ -113,7 +113,7 @@ include clean.mk
 # --------
 .SUFFIXES: .asm .hex
 
-z80.src: sz80$(EXEEXT)  shared_lib
+z80.src: sz80$(EXEEXT) shared_lib
 
 sz80$(EXEEXT): $(OBJECTS) $(PRJDIR)/*.a
        $(CXX) $(CXXFLAGS) -o $@ $(OBJECTS) $(LIBS)