EXEEXT introduces to solve Cygwin problems
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 24 Apr 2003 21:06:59 +0000 (21:06 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 24 Apr 2003 21:06:59 +0000 (21:06 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2563 4a8a32a2-be11-0410-ad9d-d568d2c75423

36 files changed:
ChangeLog
Makefile
as/mcs51/Makefile.in
as/mcs51/clean.mk
as/z80/Makefile
clean.mk
debugger/mcs51/Makefile.in
debugger/mcs51/clean.mk
doc/sdccman.lyx
link/Makefile
link/z80/Makefile
link/z80/Makefile.in
link/z80/clean.mk
packihx/Makefile.in
packihx/clean.mk
sim/ucsim/Makefile
sim/ucsim/avr.src/Makefile.in
sim/ucsim/avr.src/clean.mk
sim/ucsim/clean.mk
sim/ucsim/gui.src/Makefile.in
sim/ucsim/gui.src/serio.src/Makefile.in
sim/ucsim/gui.src/serio.src/clean.mk
sim/ucsim/main_in.mk
sim/ucsim/packages_in.mk
sim/ucsim/s51.src/Makefile.in
sim/ucsim/s51.src/clean.mk
sim/ucsim/xa.src/Makefile.in
sim/ucsim/xa.src/clean.mk
sim/ucsim/z80.src/Makefile.in
sim/ucsim/z80.src/clean.mk
src/Makefile.in
src/clean.mk
support/cpp2/clean.mk
support/makebin/Makefile
support/makebin/clean.mk
support/scripts/sdcc_mingw32

index 040bbaa42f938f4df8c54e7890fb6cdb652ec9f5..8641431f522ef740748efe4e13c9573cdf2d1f88 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,46 @@
+2003-04-24  Bernhard Held <bernhard@bernhardheld.de>
+
+       Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
+       EXEEXT was introduced to fix all related problems with targets
+       "clean", "install" and "uninstall"; a couple of further flaws
+       especially with "clean" have been fixed too
+       * as/mcs51/Makefile.in
+       * as/mcs51/clean.mk
+       * as/z80/Makefile
+       * Makefile
+       * clean.mk
+       * debugger/mcs51/Makefile.in
+       * debugger/mcs51/clean.mk
+       * link/z80/Makefile
+       * link/z80/Makefile.in
+       * link/z80/clean.mk
+       * link/Makefile
+       * packihx/Makefile.in
+       * packihx/clean.mk
+       * sim/ucsim/Makefile
+       * sim/ucsim/clean.mk
+       * sim/ucsim/avr.src/Makefile.in
+       * sim/ucsim/avr.src/clean.mk
+       * sim/ucsim/s51.src/Makefile.in
+       * sim/ucsim/s51.src/clean.mk
+       * sim/ucsim/xa.src/Makefile.in
+       * sim/ucsim/xa.src/clean.mk
+       * sim/ucsim/z80.src/Makefile.in
+       * sim/ucsim/z80.src/clean.mk
+       * sim/ucsim/main_in.mk
+       * sim/ucsim/packages_in.mk
+       * sim/ucsim/gui.src/Makefile.in
+       * sim/ucsim/gui.src/serio.src/Makefile.in
+       * sim/ucsim/gui.src/serio.src/clean.mk
+       * src/Makefile.in
+       * src/clean.mk
+       * support/cpp2/Makefile.in
+       * support/cpp2/clean.mk
+       * support/makebin/Makefile
+       * support/makebin/clean.mk
+       * support/scripts/sdcc_mingw32: --program-suffix no longer needed
+       * doc/sdccman.lyx: --program-suffix no longer needed
+
 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
 
         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
index 6d3cd33e0bdbfc28121bc12fc0fc92a3b29b44f7..4826af1040efde1ecc7c15bb7759bd781bada64b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -117,7 +117,7 @@ clean:
        $(MAKE) -f clean.mk clean
        @echo "+ Cleaning packages in their directories..."
        for pkg in $(PKGS); do\
-         $(MAKE) PORTS="$(PORTS)" -C $$pkg -f clean.mk clean ;\
+         $(MAKE) PORTS="$(PORTS)" EXEEXT=$(EXEEXT) -C $$pkg -f clean.mk clean ;\
        done
 
 # Deleting all files created by configuring or building the program
@@ -127,7 +127,7 @@ distclean:
        $(MAKE) -f clean.mk distclean
        @echo "+ DistCleaning packages using clean.mk..."
        for pkg in $(PKGS); do\
-         $(MAKE) -C $$pkg PORTS="$(PORTS)" -f clean.mk distclean ;\
+         $(MAKE) -C $$pkg PORTS="$(PORTS)" EXEEXT=$(EXEEXT) -f clean.mk distclean ;\
        done
        for pkg in $(SDCC_EXTRA); do \
          $(MAKE) -C $$pkg clean; \
@@ -138,7 +138,7 @@ distclean:
 mostlyclean: clean
        $(MAKE) -f clean.mk mostlyclean
        for pkg in $(PKGS); do\
-         $(MAKE) -C $$pkg -f clean.mk PORTS="$(PORTS)" mostlyclean ;\
+         $(MAKE) -C $$pkg -f clean.mk PORTS="$(PORTS)" EXEEXT=$(EXEEXT) mostlyclean ;\
        done
 
 
@@ -148,7 +148,7 @@ mostlyclean: clean
 realclean: distclean
        $(MAKE) -f clean.mk realclean
        for pkg in $(PKGS); do\
-         $(MAKE) -C $$pkg -f clean.mk PORTS="$(PORTS)" realclean ;\
+         $(MAKE) -C $$pkg -f clean.mk PORTS="$(PORTS)" EXEEXT=$(EXEEXT) realclean ;\
        done
 
 
index 1c4e48b862b97fe2212820fccf05c2157347199f..e57638c7d12a61436855bbdbd9f667e3b49bec9b 100644 (file)
@@ -27,6 +27,8 @@ man1dir         = $(mandir)/man1
 man2dir         = $(mandir)/man2
 infodir         = @info@
 
+EXEEXT          = @EXEEXT@
+
 CPPFLAGS       = @CPPFLAGS@ -I. -I$(PRJDIR)
 CFLAGS         = @CFLAGS@ -Wall
 M_OR_MM                = @M_OR_MM@
@@ -43,8 +45,8 @@ LKOBJECTS     = lkmain.o lkhead.o lkarea.o lkdata.o \
                  lkstore.o lknoice.o lkmem.o lkaomf51.o strcmpi.o
 LKSOURCES      = $(patsubst %.o,%.c,$(LKOBJECTS))
 
-ASX8051                = $(PRJDIR)/bin/asx8051
-ASLINK         = $(PRJDIR)/bin/aslink
+ASX8051                = $(PRJDIR)/bin/asx8051$(EXEEXT)
+ASLINK         = $(PRJDIR)/bin/aslink$(EXEEXT)
 
 transform       = @program_transform_name@
 
@@ -61,15 +63,15 @@ $(ASLINK): $(LKOBJECTS)
 # Compiling and installing everything and runing test
 # ---------------------------------------------------
 install: all installdirs
-       $(INSTALL) $(ASX8051) `echo $(bindir)/asx8051|sed '$(transform)'`
-       $(STRIP) `echo $(bindir)/asx8051|sed '$(transform)'`
-       $(INSTALL) $(ASLINK) `echo $(bindir)/aslink|sed '$(transform)'`
-       $(STRIP) `echo $(bindir)/aslink|sed '$(transform)'`
+       $(INSTALL) $(ASX8051) `echo $(bindir)/asx8051$(EXEEXT)|sed '$(transform)'`
+       $(STRIP) `echo $(bindir)/asx8051$(EXEEXT)|sed '$(transform)'`
+       $(INSTALL) $(ASLINK) `echo $(bindir)/aslink$(EXEEXT)|sed '$(transform)'`
+       $(STRIP) `echo $(bindir)/aslink$(EXEEXT)|sed '$(transform)'`
 
 # Deleting all the installed files
 # --------------------------------
 uninstall:
-       rm -f $(bindir)/asx8051 $(bindir)/aslink
+       rm -f $(bindir)/asx8051$(EXEEXT) $(bindir)/aslink$(EXEEXT)
 
 
 # Performing self-test
index 4704a9b35be5d8f1edf3760e67270d7c5eb0bce0..a447881531e465f2fdb7d7271f95f6d7a436ba9f 100644 (file)
@@ -1,9 +1,12 @@
 # Deleting all files created by building the program
 # --------------------------------------------------
+include ../../Makefile.common
+PRJDIR = ../..
+
 clean:
        rm -f *core *[%~] *.[oa]
        rm -f .[a-z]*~
-       rm -f $(PRJDIR)/asx8051 $(PRJDIR)/aslink asx8051 aslink
+       rm -f $(PRJDIR)/bin/asx8051$(EXEEXT) $(PRJDIR)/bin/aslink$(EXEEXT) asx8051$(EXEEXT) aslink$(EXEEXT)
 
 
 # Deleting all files created by configuring or building the program
index 9a914813ac4dfd35b4933c00700fde834cb0bedd..beb428f466592b7ebfcaeb1030c62860fc1ab5ae 100644 (file)
@@ -14,7 +14,7 @@ SRC   = asdata.c asexpr.c aslex.c aslist.c asmain.c asout.c \
 OBJS   = $(SRC:%.c=$(OBJDIR)/%.o)
 SLIBOBJS       = $(SLIBSRC:%.c=$(OBJDIR)/%.o) 
 
-BINS   = $(BUILDDIR)as$(EXT)
+BINS   = $(BUILDDIR)as$(EXT)$(EXEEXT)
 
 CFLAGS += $(CPPFLAGS) $(OPTS) -I. -DINDEXLIB -DMLH_MAP -DUNIX -DSDK
 CFLAGS += -funsigned-char
index a7ec1016bd4f681e1c93090ed8c738b43d4ae0a2..591147a2cb6e214a8db83d4c1b4adce254fedb80 100644 (file)
--- a/clean.mk
+++ b/clean.mk
@@ -3,7 +3,7 @@
 clean:
        rm -f *core *[%~] *.[oa]
        rm -f .[a-z]*~
-       -rm -f bin/*
+       find bin -type f ! -name README -exec rm {} \;
 
 # Deleting all files created by configuring or building the program
 # -----------------------------------------------------------------
index b85db47ad14d9c6b0ca72d0c0d4199f8ce118c7f..9b6e13c77d2503986ff1a1d4dd4a27d6344af000 100644 (file)
@@ -34,6 +34,8 @@ CFLAGS                = @CFLAGS@
 M_OR_MM                = @M_OR_MM@
 LDFLAGS                = @LDFLAGS@
 
+EXEEXT          = @EXEEXT@
+
 LIBS            = @LIBS@
 LIBDIRS         =
 
@@ -44,7 +46,7 @@ OBJECTS               = sdcdb.o symtab.o simi.o $(PRJDIR)/src/SDCCset.o \
                  $(PRJDIR)/support/Util/SDCCerr.o
 SOURCES                = $(patsubst %.o,%.c,$(OBJECTS))
 
-TARGET         = $(PRJDIR)/bin/sdcdb
+TARGET         = $(PRJDIR)/bin/sdcdb$(EXEEXT)
 
 
 # Compiling entire program or any subproject
@@ -54,8 +56,8 @@ all: checkconf $(TARGET)
 # Compiling and installing everything and runing test
 # ---------------------------------------------------
 install: all installdirs
-       $(INSTALL) $(TARGET) $(bindir)/sdcdb
-       $(STRIP) $(bindir)/sdcdb
+       $(INSTALL) $(TARGET) $(bindir)/sdcdb$(EXEEXT)
+       $(STRIP) $(bindir)/sdcdb$(EXEEXT)
        cp $(PRJDIR)/debugger/mcs51/sdcdb.el $(bindir)/sdcdb.el
        cp $(PRJDIR)/debugger/mcs51/sdcdbsrc.el $(bindir)/sdcdbsrc.el
 
@@ -63,7 +65,7 @@ install: all installdirs
 # Deleting all the installed files
 # --------------------------------
 uninstall:
-       rm -f $(bindir)/sdcdb
+       rm -f $(bindir)/sdcdb$(EXEEXT)
        rm -f $(bindir)/sdcdb.el
        rm -f $(bindir)/sdcdbsrc.el
 
index 3a67269ce00631ea5dbc1c789e9ee0ccac1d1232..6c54d98c86614f6ae9151292c1c2c015a2dc0979 100644 (file)
@@ -1,9 +1,11 @@
 # Deleting all files created by building the program
 # --------------------------------------------------
+PRJDIR = ../..
+
 clean:
        rm -f *core *[%~] *.[oa]
        rm -f .[a-z]*~
-       rm -f $(PRJDIR)/bin/sdcdb \
+       rm -f $(PRJDIR)/bin/sdcdb$(EXEEXT) \
        $(PRJDIR)/support/Util/SDCCerr.o
 
 # Deleting all files created by configuring or building the program
index 61e8d9eb895fd19c423475e42de265ca066b5d2f..fa87ad1d8642e9069c0f7363415bd50dbefffa25 100644 (file)
@@ -1061,19 +1061,6 @@ lib
   ---disable-ucsim 
 \backslash 
 
-\layout LyX-Code
-
-  ---program-suffix=
-\begin_inset Quotes srd
-\end_inset 
-
-.exe
-\begin_inset Quotes srd
-\end_inset 
-
-\backslash 
-
 \layout LyX-Code
 
   ---host=i586-mingw32msvc ---build=unknown-unknown-linux-gnu
index e58ca903e5037339c10c12af28b4e1db176c8845..64c568d6d0df4d242a45f4f957af4f1f0cc13e06 100644 (file)
@@ -8,12 +8,12 @@ all:
        $(MAKE) -C z80 _link-z80 _link-gbz80 E=$(E) BUILDDIR=../../bin/
 
 install: all
-       $(INSTALL) $(PRJDIR)/bin/link-z80 `echo $(bindir)/link-z80|sed '$(transform)'`
-       $(STRIP) `echo $(bindir)/link-z80|sed '$(transform)'`
-       $(INSTALL) $(PRJDIR)/bin/link-gbz80 `echo $(bindir)/link-gbz80|sed '$(transform)'`
-       $(STRIP) `echo $(bindir)/link-gbz80|sed '$(transform)'`
+       $(INSTALL) $(PRJDIR)/bin/link-z80$(EXEEXT) `echo $(bindir)/link-z80$(EXEEXT)|sed '$(transform)'`
+       $(STRIP) `echo $(bindir)/link-z80$(EXEEXT)|sed '$(transform)'`
+       $(INSTALL) $(PRJDIR)/bin/link-gbz80$(EXEEXT) `echo $(bindir)/link-gbz80$(EXEEXT)|sed '$(transform)'`
+       $(STRIP) `echo $(bindir)/link-gbz80$(EXEEXT)|sed '$(transform)'`
 
 uninstall:
-       cd $(bindir); rm -f link-z80 link-gbz80
+       cd $(bindir); rm -f link-z80$(EXEEXT) link-gbz80$(EXEEXT)
 
 include clean.mk
index 9a9c80b9c03589520ebb140db66f3289de697240..33764018401b58a54a769feb20647d5dae43f62d 100644 (file)
@@ -13,7 +13,7 @@ SRC   = lkarea.c lkdata.c lkeval.c lkhead.c lkihx.c lklex.c \
 OBJS   = $(SRC:%.c=$(OBJDIR)/%.o) 
 SLIBOBJS       = $(SLIBSRC:%.c=$(OBJDIR)/%.o) 
 
-BINS   = $(BUILDDIR)link$(EXT)
+BINS   = $(BUILDDIR)link$(EXT)$(EXEEXT)
 
 CFLAGS += $(CPPFLAGS) $(OPTS) -DINDEXLIB -DMLH_MAP -DUNIX -DSDK
 CFLAGS += -funsigned-char -DUNIX
index ed966a289bd15b2f739e5f33166591898ecf3ee2..adc87f421e2becc5c6852ac646365736d4076c30 100644 (file)
@@ -14,6 +14,8 @@ INSTALL               = @INSTALL@
 
 PRJDIR         = ../..
 
+EXEEXT          = @EXEEXT@
+
 srcdir         = @srcdir@
 prefix         = @prefix@
 exec_prefix     = @exec_prefix@
@@ -40,7 +42,7 @@ LKOBJECTS     = lkarea.o lkdata.o lkeval.o lkhead.o lkihx.o lklex.o \
                  lkgb.o lkgg.o 
 LKSOURCES      = $(patsubst %.o,%.c,$(LKOBJECTS))
 
-LKZ80          = $(PRJDIR)/bin/link-z80
+LKZ80          = $(PRJDIR)/bin/link-z80$(EXEEXT)
 
 # Compiling entire program or any subproject
 # ------------------------------------------
@@ -52,12 +54,12 @@ $(LKZ80): $(SLIBOBJS) $(LKOBJECTS)
 # Compiling and installing everything and runing test
 # ---------------------------------------------------
 install: all installdirs
-       $(INSTALL) $(LKZ80) $(bindir)/link-z80
+       $(INSTALL) $(LKZ80) $(bindir)/link-z80$(EXEEXT)
 
 # Deleting all the installed files
 # --------------------------------
 uninstall:
-       rm -f $(bindir)/link-z80
+       rm -f $(bindir)/link-z80$(EXEEXT)
 
 
 # Performing self-test
index 8394c52a3e4829679779f31bc588cbd779454f70..9874fc3f5e654e212eff2073b9a77c55633d2192 100644 (file)
@@ -1,9 +1,13 @@
 # Deleting all files created by building the program
 # --------------------------------------------------
+PRJDIR = ../..
+include $(PRJDIR)/Makefile.common
+
 clean:
        rm -f *core *[%~] *.[oa]
        rm -f .[a-z]*~
-       rm -f $(PRJDIR)/link-z80 link-z80
+       rm -f $(PRJDIR)/bin/link-z80$(EXEEXT) link-z80$(EXEEXT) \
+             $(PRJDIR)/bin/link-gbz80$(EXEEXT) link-gbz80$(EXEEXT)
        rm -f *.dep
        rm -rf obj
 
index 8fe6bfc9ef460a2f005088065515a8a61f2c488d..f361f6e2c998a63c7e2094de2760aff86c8f6051 100644 (file)
@@ -8,18 +8,18 @@ OBJECTS       = packihx.o
 
 SOURCES                = $(patsubst %.o,%.c,$(OBJECTS))
 
-TARGET         = $(PRJDIR)/bin/packihx
+TARGET         = $(PRJDIR)/bin/packihx$(EXEEXT)
 
 all: $(TARGET)
 
 install: all installdirs
-       $(INSTALL) $(TARGET) `echo $(bindir)/packihx|sed '$(transform)'`
-       $(STRIP) `echo $(bindir)/packihx|sed '$(transform)'`
+       $(INSTALL) $(TARGET) `echo $(bindir)/packihx$(EXEEXT)|sed '$(transform)'`
+       $(STRIP) `echo $(bindir)/packihx$(EXEEXT)|sed '$(transform)'`
 
 # Deleting all the installed files
 # --------------------------------
 uninstall:
-       rm -f $(bindir)/packihx
+       rm -f $(bindir)/packihx$(EXEEXT)
 
 # Performing self-test
 # --------------------
index 64f8c1a08aad3b1bf15fde86f16c73bffe6e512a..734faae5a11e37bfee2665a36599479c6959260d 100644 (file)
@@ -1,7 +1,9 @@
+PRJDIR = ..
+
 clean:
        rm -f *core *[%~] *.[oa] *.output
        rm -f .[a-z]*~ \#*
-       rm -f packihx
+       rm -f $(PRJDIR)/bin/packihx$(EXEEXT)
 
 distclean realclean: clean
        rm -f config.* Makefile
index 04c9953d9698b60af3c2c2fbd349e0439a674402..ce162ff10d776f82369bf3b61ba55027318f398e 100644 (file)
@@ -50,9 +50,9 @@ uninstall:
 # Deleting all files created by building the program
 # --------------------------------------------------
 clean:
-       $(MAKE) -f clean.mk clean
+       $(MAKE) -f clean.mk clean EXEEXT=$(EXEEXT)
        @for pkg in $(PKGS); do\
-         $(MAKE) -C $$pkg -f clean.mk clean ;\
+         $(MAKE) -C $$pkg -f clean.mk clean EXEEXT=$(EXEEXT) ;\
        done
 
 
index 37a310063adab9125900f7de3870eb80e23b58c0..57cbf209b9b096834e927e8ca41ff9a70bbff6f0 100644 (file)
@@ -24,6 +24,8 @@ M_OR_MM         = @M_OR_MM@
 PICOPT         = @PICOPT@
 SHAREDLIB      = @SHAREDLIB@
 
+EXEEXT          = @EXEEXT@
+
 LIBS           = @LIBS@ -L$(PRJDIR) -lsim -lutil -lsim -lcmd -lguiucsim
 DL             = @DL@
 dl_ok          = @dl_ok@
@@ -63,13 +65,13 @@ all: checkconf otherlibs avr.src
 # Compiling and installing everything and runing test
 # ---------------------------------------------------
 install: all installdirs
-       $(INSTALL) -s savr $(bindir)
+       $(INSTALL) -s savr$(EXEEXT) $(bindir)
 
 
 # Deleting all the installed files
 # --------------------------------
 uninstall:
-       rm -f $(bindir)/savr
+       rm -f $(bindir)/savr$(EXEEXT)
 
 
 # Performing self-test
@@ -108,10 +110,10 @@ 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
index 03429cbc66c8fc347e027fb4d6c9d3ed8d5007e1..e81b3cc7cd9e52648409e8b6d5fad7acd0427fb2 100644 (file)
@@ -5,7 +5,7 @@
 clean:
        rm -f *core *[%~] *.[oa] *.map
        rm -f .[a-z]*~
-       rm -f savr
+       rm -f savr$(EXEEXT)
 
 
 # Deleting all files created by configuring or building the program
index 93eefab0064c834833d093e95646d5fe3295b4d2..7643b5e130dfc2b42c30e73eaab49eca84056c43 100644 (file)
@@ -1,7 +1,7 @@
 # Deleting all files created by building the program
 # --------------------------------------------------
 clean:
-       rm -f *core *[%~] *.[oa] *.so ucsim
+       rm -f *core *[%~] *.[oa] *.so ucsim$(EXEEXT)
        rm -f .[a-z]*~
 
 
index 4b09fab80d64af2019e1bf942431fa211388dbd9..1364969cf22067dd3bfb0ae8a28e77619624b7cb 100644 (file)
@@ -92,9 +92,11 @@ install_gui_api:
 # Deleting all the installed files
 # --------------------------------
 uninstall: uninstall_gui_api
+ifeq ($(curses_ok),yes)
        @for pkg in $(PKGS); do\
          cd $$pkg && $(MAKE) uninstall ; cd ..;\
        done
+endif
 
 uninstall_gui_api:
 
index 2044473cccc915314b504873fa504e7d1ddfe0ef..9c71adcdc57491f8a3b0cbfa345ced8a665c5704 100644 (file)
@@ -17,6 +17,8 @@ M_OR_MM         = @M_OR_MM@
 
 LIBS           = @CURSES_LIBS@ @LIBS@
 
+EXEEXT          = @EXEEXT@
+
 curses_ok      = @curses_ok@
 
 prefix          = @prefix@
@@ -39,7 +41,7 @@ OBJECTS               = main.o fileio.o frontend.o posix_signal.o
 all: serio.src
 
 ifeq ($(curses_ok),yes)
-serio.src: checkconf serialview
+serio.src: checkconf serialview$(EXEEXT)
 else
 serio.src: checkconf
 endif
@@ -48,13 +50,13 @@ endif
 # Compiling and installing everything and runing test
 # ---------------------------------------------------
 install: all installdirs
-       $(INSTALL) -s serialview $(bindir)
+       $(INSTALL) -s serialview$(EXEEXT) $(bindir)
 
 
 # Deleting all the installed files
 # --------------------------------
 uninstall:
-       rm -f $(bindir)/serialview
+       rm -f $(bindir)/serialview$(EXEEXT)
 
 
 # Performing self-test
@@ -88,7 +90,7 @@ include clean.mk
 
 # My rules
 # --------
-serialview: $(OBJECTS)
+serialview$(EXEEXT): $(OBJECTS)
        $(CXX) -o $@ $(LDFLAGS) $(OBJECTS) $(LIBS)
 
 .cc.o:
index 15d74cd6c06808a7e27110b43b0b407418cdbefc..f50d8c67679c512526a1ed4420e6caaded6a9e0d 100644 (file)
@@ -5,7 +5,7 @@
 clean:
        rm -f *core *[%~] *.[oa]
        rm -f .[a-z]*~
-       rm -f serialview
+       rm -f serialview$(EXEEXT)
 
 
 # Deleting all files created by configuring or building the program
index 99cfc2320bfb446df3df870eab3700b2d8eb66f7..413f4dbe2f0b6a5b90e76d5d51a7bfe325507e2e 100644 (file)
@@ -26,6 +26,8 @@ CFLAGS          = @CFLAGS@ -I$(PRJDIR) -Wall
 CXXFLAGS        = @CXXFLAGS@ -I$(PRJDIR) -Wall
 M_OR_MM         = @M_OR_MM@
 
+EXEEXT          = @EXEEXT@
+
 LIB_LIST       = util sim cmd sim
 UCSIM_LIBS     = $(patsubst %,-l%,$(LIB_LIST))
 UCSIM_LIB_FILES        = $(patsubst %,lib%.a,$(LIB_LIST))
@@ -67,10 +69,10 @@ install: all installdirs
 # Deleting all the installed files
 # --------------------------------
 uninstall:
-       rm -f $(bindir)/s51
-       rm -f $(bindir)/savr
-       rm -f $(bindir)/serialview
-       rm -f $(bindir)/portmon
+       rm -f $(bindir)/s51$(EXEEXT)
+       rm -f $(bindir)/savr$(EXEEXT)
+       rm -f $(bindir)/serialview$(EXEEXT)
+       rm -f $(bindir)/portmon$(EXEEXT)
 
 
 # Performing self-test
index 6a3675d35f1ab03f4394bfb41ed81544a96b66e7..616513ff52e4296c14f2f071b25cf59defb418bd 100644 (file)
@@ -1,3 +1,5 @@
+EXEEXT          = @EXEEXT@
+
 enable_51      = @enable_51@
 enable_avr     = @enable_avr@
 enable_z80     = @enable_z80@
index 4e5da1d7cd771934d211fda75818f32ab8a5fd74..89a45c9e3d5648978a50f1c93322a3c31a13f08d 100644 (file)
@@ -45,6 +45,8 @@ man2dir         = $(mandir)/man2
 infodir         = @infodir@
 srcdir          = @srcdir@
 
+EXEEXT          = @EXEEXT@
+
 OBJECTS_SHARED = glob.o sim51.o \
                  inc.o jmp.o mov.o logic.o arith.o bit.o \
                  timer0.o timer1.o timer2.o serial.o port.o interrupt.o \
@@ -66,14 +68,13 @@ all: checkconf otherlibs s51.src
 # Compiling and installing everything and runing test
 # ---------------------------------------------------
 install: all installdirs
-       if test -f s51.exe; then $(INSTALL) -s s51.exe $(bindir); $(STRIP) $(bindir)/s51.exe; fi
-       if test -f s51; then $(INSTALL) -s s51 $(bindir); $(STRIP) $(bindir)/s51; fi
+       $(INSTALL) -s s51$(EXEEXT) $(bindir)
 
 
 # Deleting all the installed files
 # --------------------------------
 uninstall:
-       rm -f $(bindir)/s51
+       rm -f $(bindir)/s51$(EXEEXT)
 
 
 # Performing self-test
@@ -114,10 +115,10 @@ include clean.mk
 # --------
 .SUFFIXES: .rel
 
-s51.src: s51 shared_lib
+s51.src: s51$(EXEEXT) shared_lib
 
-s51: $(OBJECTS) $(PRJDIR)/*.a
-       $(CXX) $(CXXFLAGS) $(OBJECTS) $(LIBS) -o s51
+s51$(EXEEXT): $(OBJECTS) $(PRJDIR)/*.a
+       $(CXX) $(CXXFLAGS) $(OBJECTS) $(LIBS) -o $@
 
 ifeq ($(dlso_ok),yes)
 shared_lib: $(PRJDIR)/s51.so
@@ -128,7 +129,7 @@ shared_lib:
 endif
 
 $(PRJDIR)/s51.so: $(OBJECTS_SHARED)
-       $(CXX) -shared $(OBJECTS_SHARED) -o $(PRJDIR)/s51.so
+       $(CXX) -shared $(OBJECTS_SHARED) -o $@
 
 otherlibs:
        cd $(PRJDIR)/cmd.src && $(MAKE) all
index b12c6104a8ace37018bb236a229e346264f6e210..72a866e4f4883a8b2d3b7770f7e700c7b89c6a04 100644 (file)
@@ -6,7 +6,7 @@ clean:
        rm -f *core *[%~] *.[oa]
        rm -f test_*.??* '(null).cdb' *.lnk *.ihx
        rm -f .[a-z]*~
-       rm -f s51
+       rm -f s51$(EXEEXT)
 
 
 # Deleting all files created by configuring or building the program
index 56e5fd09109012d66e899a9ae9f4750db0505bb3..de6236827d7606f4968c7502696f9dd47cf8393e 100644 (file)
@@ -15,6 +15,8 @@ INSTALL               = @INSTALL@
 
 PRJDIR         = ..
 
+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
@@ -55,13 +57,13 @@ tests: $(TEST_OBJ)
 # Compiling and installing everything and runing test
 # ---------------------------------------------------
 install: all installdirs
-       $(INSTALL) -s sxa $(bindir)
+       $(INSTALL) -s sxa$(EXEEXT) $(bindir)
 
 
 # Deleting all the installed files
 # --------------------------------
 uninstall:
-       rm -f $(bindir)/sxa
+       rm -f $(bindir)/sxa$(EXEEXT)
 
 
 # Performing self-test
@@ -94,10 +96,10 @@ include clean.mk
 # --------
 .SUFFIXES: .asm .hex
 
-xa.src: sxa
+xa.src: sxa$(EXEEXT)
 
-sxa: $(OBJECTS) $(PRJDIR)/*.a
-       $(CXX) $(CXXFLAGS) -o sxa $(OBJECTS) $(LIBS)
+sxa$(EXEEXT): $(OBJECTS) $(PRJDIR)/*.a
+       $(CXX) $(CXXFLAGS) -o $@ $(OBJECTS) $(LIBS)
 
 otherlibs:
        cd $(PRJDIR)/cmd.src && $(MAKE) all
index 4975190b4578ecf1aca9f46e7f1446077da660f3..f7f2416093b2eaa3986d5fdda760486eb477887c 100644 (file)
@@ -3,7 +3,7 @@
 clean:
        rm -f *core *[%~] *.[oa]
        rm -f .[a-z]*~
-       rm -f sxa
+       rm -f sxa$(EXEEXT)
 
 
 # Deleting all files created by configuring or building the program
index 40fc4566c3e2bfc73360fa9642501a9dbb35e024..8aed4371f08b92a44ff7f6b7dbc5f61fd23f26af 100644 (file)
@@ -24,6 +24,8 @@ M_OR_MM         = @M_OR_MM@
 PICOPT         = @PICOPT@
 SHAREDLIB      = @SHAREDLIB@
 
+EXEEXT          = @EXEEXT@
+
 LIBS           = @LIBS@ -L$(PRJDIR) -lutil -lsim -lutil -lcmd -lguiucsim
 DL             = @DL@
 dl_ok          = @dl_ok@
@@ -70,13 +72,13 @@ tests: $(TEST_OBJ)
 # Compiling and installing everything and runing test
 # ---------------------------------------------------
 install: all installdirs
-       $(INSTALL) -s sz80 $(bindir)
+       $(INSTALL) -s sz80$(EXEEXT) $(bindir)
 
 
 # Deleting all the installed files
 # --------------------------------
 uninstall:
-       rm -f $(bindir)/sz80
+       rm -f $(bindir)/sz80$(EXEEXT)
 
 
 # Performing self-test
@@ -111,10 +113,10 @@ include clean.mk
 # --------
 .SUFFIXES: .asm .hex
 
-z80.src: sz80  shared_lib
+z80.src: sz80$(EXEEXT)  shared_lib
 
-sz80: $(OBJECTS) $(PRJDIR)/*.a
-       $(CXX) $(CXXFLAGS) -o sz80 $(OBJECTS) $(LIBS)
+sz80$(EXEEXT): $(OBJECTS) $(PRJDIR)/*.a
+       $(CXX) $(CXXFLAGS) -o $@ $(OBJECTS) $(LIBS)
 
 ifeq ($(dlso_ok),yes)
 shared_lib: $(PRJDIR)/sz80.so
index b8362d003532102295bdca5312e402a0473cc332..5781b8c3bdc419e6d8e6b7b3a8583dd30dedf3ea 100644 (file)
@@ -3,7 +3,7 @@
 clean:
        rm -f *core *[%~] *.[oa]
        rm -f .[a-z]*~
-       rm -f sz80
+       rm -f sz80$(EXEEXT)
 
 
 # Deleting all files created by configuring or building the program
index de2108db647a3da682223a7a4ab1ab86bfb12828..1c3d85b228c96532283b58d587ed26dcfd5f3c0e 100644 (file)
@@ -56,14 +56,14 @@ $(PRJDIR)/support/gc/libgc.a:
 # Compiling and installing everything and runing test
 # ---------------------------------------------------
 install: all installdirs
-       $(INSTALL) $(TARGET) `echo $(bindir)/sdcc|sed '$(transform)'`
-       $(STRIP) `echo $(bindir)/sdcc|sed '$(transform)'`
+       $(INSTALL) $(TARGET) `echo $(bindir)/sdcc$(EXEEXT)|sed '$(transform)'`
+       $(STRIP) `echo $(bindir)/sdcc$(EXEEXT)|sed '$(transform)'`
 
 
 # Deleting all the installed files
 # --------------------------------
 uninstall:
-       rm -f $(bindir)/sdcc
+       rm -f $(bindir)/sdcc$(EXEEXT)
 
 # Performing self-test
 # --------------------
index 21d366e8ef0b0700863872ba1bf4d4648da27ece..074e9cf0782e8bfb9b141ebed46aef9a78ad8e14 100644 (file)
@@ -6,7 +6,7 @@ PRJDIR = ..
 clean:
        rm -f *core *[%~] *.[oa] *.output
        rm -f .[a-z]*~ \#*
-       rm -f $(PRJDIR)/bin/sdcc sdcc
+       rm -f $(PRJDIR)/bin/sdcc$(EXEEXT) sdcc$(EXEEXT)
        for port in $(CLEANALLPORTS) ; do\
          $(MAKE) -C $$port -f ../port-clean.mk clean ;\
        done
index 8b506b610ed34047630ac7863a166ac030733c34..8ab53b741151e03f1bc1a0f9d4f66be52db439d5 100644 (file)
@@ -5,7 +5,7 @@ PRJDIR = ../..
 clean:
        rm -f *core *[%~] *.[oa]
        rm -f .[a-z]*~
-       rm -f $(PRJDIR)/bin/sdcpp
+       rm -f $(PRJDIR)/bin/sdcpp$(EXEEXT)
 
 
 # Deleting all files created by configuring or building the program
index de2ea9ae2449f898bdb8d2f2baad2fb7cb8bf074..66e49b30858715328d7494214e6b6a4cb4e5bde7 100644 (file)
@@ -1,7 +1,7 @@
 PRJDIR = ../..
 
 SOURCES = makebin.c
-BIN = $(PRJDIR)/bin/makebin
+BIN = $(PRJDIR)/bin/makebin$(EXEEXT)
 
 include $(PRJDIR)/Makefile.common
 
@@ -12,9 +12,10 @@ $(BIN): $(OBJ)
 
 install: all
        mkdir -p $(bindir)
-       $(INSTALL) $(BIN) `echo $(bindir)/makebin|sed '$(transform)'`
+       $(INSTALL) $(BIN) `echo $(bindir)/makebin$(EXEEXT)|sed '$(transform)'`
+       $(STRIP) `echo $(bindir)/makebin$(EXEEXT)|sed '$(transform)'`
 
 uninstall:
-       rm -f $(bindir)/makebin
+       rm -f $(bindir)/makebin$(EXEEXT)
 
 include clean.mk
index db12b136a9f770db5a62ce6a4b1e13f76ab04dd1..dfe9fb2067442abb00bf8eb04de51f1b9591c0b5 100644 (file)
@@ -1,8 +1,10 @@
 # Deleting all files created by building the program
 # --------------------------------------------------
+PRJDIR = ../..
+
 clean:
        rm -rf obj
-       rm -f *core *[%~] *.[oa] makebin
+       rm -f *core *[%~] *.[oa] $(PRJDIR)/bin/makebin$(EXEEXT)
        rm -f *.[a-z]*~
 
 # Deleting all files created by configuring or building the program
index 6f88e95703e9944aefa8eab8e52d5757232e92d6..d9f8bf7db9b7a1a0da2f72067089f86197b505d6 100755 (executable)
@@ -16,7 +16,6 @@ lib_dir_suffix=lib \
 sdccconf_h_dir_separator=\\\\ \
 --disable-device-lib-build \
 --disable-ucsim \
---program-suffix=.exe \
 --host=i586-mingw32msvc --build=unknown-unknown-linux-gnu"
 
 ./configure $SDCCCONFIGUREFLAGS