aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2015-09-08 17:20:57 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2015-09-08 17:20:57 +0000
commitdc14cd6b90f45f4a0643fdd5477a31159e1c1f31 (patch)
tree3073b96bd1a6176b3c625a9ddd2b5e116c7d4920
parent5b63d740de5efca654842b4a3b2dbe77bc6b188a (diff)
properly use dependencies in Make targets
svn path=/trunk/externals/iemlib/; revision=17556
-rw-r--r--Make.include16
1 files changed, 10 insertions, 6 deletions
diff --git a/Make.include b/Make.include
index 41c2748..2e9de50 100644
--- a/Make.include
+++ b/Make.include
@@ -44,12 +44,16 @@ clean:
-rm -f ../../lib/$(TARGET).$(EXT) $(TARGET).$(EXT)
-rm -f *.o
-all: $(OBJ)
- @echo :: $(OBJ)
- $(LD) $(PD_LDFLAGS) -o $(TARGET).$(EXT) *.o $(PD_LIB)
- $(STRIP) --strip-unneeded $(TARGET).$(EXT)
- -cp $(TARGET).$(EXT) ../../lib/
+all: $(TARGET).$(EXT)
+
+.PHONY: current clean all
+
+$(TARGET).$(EXT): $(OBJ)
+ @echo :: $^
+ $(LD) $(PD_LDFLAGS) -o $@ $^ $(PD_LIB)
+ $(STRIP) --strip-unneeded $@
+ -cp $@ ../../lib/
$(OBJ) : %.o : %.c
- $(CC) $(PD_CFLAGS) $(PD_INCLUDES) -c -o $*.o $*.c
+ $(CC) $(PD_CFLAGS) $(PD_INCLUDES) -c -o $@ $<