[hackers] [surf/surf-webkit2] Makefile: use explicit targets || Quentin Rameau
commit 7dcce9e1b9dbd2be198c19abd36e71eba7d09063
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Sat Nov 7 18:43:11 2020 +0100
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Sat Nov 7 18:43:11 2020 +0100
Makefile: use explicit targets
Some make implementation have trouble with following inference rules
indirection
diff --git a/Makefile b/Makefile
index 9f93b0b..e5d4172 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -19,22 +19,22 @@ options:
_AT_echo "WEBEXTCFLAGS = $(WEBEXTCFLAGS) $(CFLAGS)"
_AT_echo "LDFLAGS = $(LDFLAGS)"
-.c.o:
- $(CC) $(SURFCFLAGS) $(CFLAGS) -c $<
+surf: $(OBJ)
+ $(CC) $(SURFLDFLAGS) $(LDFLAGS) -o $_AT_ $(OBJ) $(LIBS)
-.o.so:
- $(CC) -shared -Wl,-soname,$_AT_ $(LDFLAGS) -o $@ $< $(WEBEXTLIBS)
+$(OBJ) $(WOBJ): config.h common.h config.mk
config.h:
cp config.def.h $_AT_
-$(OBJ) $(WOBJ): config.h common.h config.mk
+$(OBJ): $(SRC)
+ $(CC) $(SURFCFLAGS) $(CFLAGS) -c $(SRC)
-surf: $(OBJ)
- $(CC) $(SURFLDFLAGS) $(LDFLAGS) -o $_AT_ $(OBJ) $(LIBS)
+$(WLIB): $(WOBJ)
+ $(CC) -shared -Wl,-soname,$_AT_ $(LDFLAGS) -o $@ $? $(WEBEXTLIBS)
-$(WOBJ):
- $(CC) $(WEBEXTCFLAGS) $(CFLAGS) -c $(_AT_:.o=.c)
+$(WOBJ): $(WSRC)
+ $(CC) $(WEBEXTCFLAGS) $(CFLAGS) -c $(WSRC)
clean:
rm -f surf $(OBJ)
_AT_@ -73,5 +73,4 @@ uninstall:
done
- rmdir $(DESTDIR)$(LIBDIR)
-.SUFFIXES: .so .o .c
.PHONY: all options distclean clean dist install uninstall
Received on Sat Nov 07 2020 - 18:45:09 CET
This archive was generated by hypermail 2.3.0
: Sat Nov 07 2020 - 18:48:33 CET