* sim/ucsim/gui.src/serio.src/Makefile.in, sim/ucsim/s51.src/Makefile.in, sim/ucsim...
[fw/sdcc] / sim / ucsim / avr.src / Makefile.in
index 7341030969f0156ccfe136af64778ff71846e010..f2e1ed16bd2a4abebbc10c1b2a05511568a8c990 100644 (file)
@@ -12,6 +12,7 @@ CPP           = @CPP@
 CXXCPP         = @CXXCPP@
 RANLIB         = @RANLIB@
 INSTALL                = @INSTALL@
+STRIP          = @STRIP@
 
 PRJDIR         = ..
 
@@ -23,8 +24,9 @@ CXXFLAGS        = @CXXFLAGS@ -Wall
 M_OR_MM         = @M_OR_MM@
 PICOPT         = @PICOPT@
 SHAREDLIB      = @SHAREDLIB@
+EXEEXT         = @EXEEXT@
 
-LIBS           = @LIBS@ -L$(PRJDIR) -lsim -lutil -lsim -lcmd -lguiucsim
+LIBS           = @LIBS@ -L$(PRJDIR) -lsim -lutil -lguiucsim -lcmd -lsim
 DL             = @DL@
 dl_ok          = @dl_ok@
 
@@ -63,13 +65,14 @@ all: checkconf otherlibs avr.src
 # Compiling and installing everything and runing test
 # ---------------------------------------------------
 install: all installdirs
-       $(INSTALL) -s savr $(bindir)
+       $(INSTALL) savr$(EXEEXT) $(DESTDIR)$(bindir)/savr$(EXEEXT)
+       $(STRIP) $(DESTDIR)$(bindir)/savr$(EXEEXT)
 
 
 # Deleting all the installed files
 # --------------------------------
 uninstall:
-       rm -f $(bindir)/savr
+       rm -f $(DESTDIR)$(bindir)/savr
 
 
 # Performing self-test
@@ -87,7 +90,7 @@ installcheck:
 # Creating installation directories
 # ---------------------------------
 installdirs:
-       test -d $(bindir) || $(INSTALL) -d $(bindir)
+       test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir)
 
 
 # Creating dependencies
@@ -108,17 +111,17 @@ include clean.mk
 # --------
 .SUFFIXES: .asm .hex
 
-avr.src: savr shared_lib
+avr.src: savr$(EXEEXT) shared_lib
 
-savr: $(OBJECTS) $(PRJDIR)/*.a
-       $(CXX) $(CXXFLAGS) $(OBJECTS) $(LIBS) -o savr
+savr$(EXEEXT): $(OBJECTS) $(PRJDIR)/*.a
+       $(CXX) $(CXXFLAGS) $(OBJECTS) $(LIBS) -o $@
 
 ifeq ($(dlso_ok),yes)
 shared_lib: $(PRJDIR)/savr.so
 else
 shared_lib:
-       @echo "No AVR shared lib made."
-       @echo "(SHAREDLIB="$(SHAREDLIB)",dl_ok="$(dl_ok)",enable_dlso="$(enable_dlso)")"
+       @$(PRJDIR)/mkecho $(PRJDIR) "No AVR shared lib made."
+       @$(PRJDIR)/mkecho $(PRJDIR) "(SHAREDLIB="$(SHAREDLIB)",dl_ok="$(dl_ok)",enable_dlso="$(enable_dlso)")"
 endif
 
 $(PRJDIR)/savr.so: $(OBJECTS_SHARED)