aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Makefile b/src/Makefile
index b234784..cda0443 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -30,7 +30,6 @@ z_zexy.c z_zexy.h:
-include Make.config
-
## 2nd only generate depend-files when we have Make.config included
## and thus MAKEDEP_FLAGS defined
ifdef MAKEDEP_FLAGS
@@ -47,7 +46,7 @@ endif
TARGETS = $(SOURCES:.c=.o)
-OBJECTS = $(OBJECTSOURCES:.c=)
+OBJECTS = $(OBJECTSOURCES:.c=.$(EXT))
## if $(BUILDLIBRARY) is defined, we build everything as a single library
## else we build separate externals
@@ -58,9 +57,9 @@ else
all: $(OBJECTS)
endif
-$(OBJECTS): % : %.o
- $(LD) $(LFLAGS) -o $@.$(EXT) $@.o $(LIBS)
- $(STRIP) $(STRIPFLAGS) $@.$(EXT)
+$(OBJECTS): %.$(EXT) : %.o
+ $(LD) $(LFLAGS) -o $@ $*.o $(LIBS)
+ $(STRIP) $(STRIPFLAGS) $@
$(LIBNAME): $(TARGETS) z_zexy.c z_zexy.h
$(LD) $(LFLAGS) -o $@.$(EXT) *.o $(LIBS)