EXEEXT introduces to solve Cygwin problems
[fw/sdcc] / src / Makefile.in
index 8aa40707f5cc8ce5a13ffb764541be87fdef0d13..1c3d85b228c96532283b58d587ed26dcfd5f3c0e 100644 (file)
@@ -45,7 +45,7 @@ TARGET                = $(PRJDIR)/bin/sdcc$(EXEEXT)
 # ------------------------------------------
 all: checkconf $(TARGET)
 
-*/port.a: FORCE 
+$(PORT_LIBS): FORCE 
        $(MAKE) -C `dirname $@`
  
 FORCE:
@@ -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
 # --------------------
@@ -95,7 +95,7 @@ include clean.mk
 # My rules
 # --------
 $(TARGET): $(SLIBOBJS) $(OBJECTS) $(PORT_LIBS)
-       $(CC) -o $@ $(SLIBOBJS) $(OBJECTS) $(PORT_LIBS) $(LIBDIRS) $(LIBS)
+       $(CC) $(LDFLAGS) -o $@ $(SLIBOBJS) $(OBJECTS) $(PORT_LIBS) $(LIBDIRS) $(LIBS)
 
 .c.o:
        $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@