Makefile: use explicit targets
Some make implementation have trouble with following inference rules indirection
This commit is contained in:
parent
262c3ee24a
commit
7dcce9e1b9
1 changed files with 9 additions and 10 deletions
19
Makefile
19
Makefile
|
@ -19,22 +19,22 @@ options:
|
||||||
@echo "WEBEXTCFLAGS = $(WEBEXTCFLAGS) $(CFLAGS)"
|
@echo "WEBEXTCFLAGS = $(WEBEXTCFLAGS) $(CFLAGS)"
|
||||||
@echo "LDFLAGS = $(LDFLAGS)"
|
@echo "LDFLAGS = $(LDFLAGS)"
|
||||||
|
|
||||||
.c.o:
|
surf: $(OBJ)
|
||||||
$(CC) $(SURFCFLAGS) $(CFLAGS) -c $<
|
$(CC) $(SURFLDFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
|
||||||
|
|
||||||
.o.so:
|
$(OBJ) $(WOBJ): config.h common.h config.mk
|
||||||
$(CC) -shared -Wl,-soname,$@ $(LDFLAGS) -o $@ $< $(WEBEXTLIBS)
|
|
||||||
|
|
||||||
config.h:
|
config.h:
|
||||||
cp config.def.h $@
|
cp config.def.h $@
|
||||||
|
|
||||||
$(OBJ) $(WOBJ): config.h common.h config.mk
|
$(OBJ): $(SRC)
|
||||||
|
$(CC) $(SURFCFLAGS) $(CFLAGS) -c $(SRC)
|
||||||
|
|
||||||
surf: $(OBJ)
|
$(WLIB): $(WOBJ)
|
||||||
$(CC) $(SURFLDFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
|
$(CC) -shared -Wl,-soname,$@ $(LDFLAGS) -o $@ $? $(WEBEXTLIBS)
|
||||||
|
|
||||||
$(WOBJ):
|
$(WOBJ): $(WSRC)
|
||||||
$(CC) $(WEBEXTCFLAGS) $(CFLAGS) -c $(@:.o=.c)
|
$(CC) $(WEBEXTCFLAGS) $(CFLAGS) -c $(WSRC)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f surf $(OBJ)
|
rm -f surf $(OBJ)
|
||||||
|
@ -73,5 +73,4 @@ uninstall:
|
||||||
done
|
done
|
||||||
- rmdir $(DESTDIR)$(LIBDIR)
|
- rmdir $(DESTDIR)$(LIBDIR)
|
||||||
|
|
||||||
.SUFFIXES: .so .o .c
|
|
||||||
.PHONY: all options distclean clean dist install uninstall
|
.PHONY: all options distclean clean dist install uninstall
|
||||||
|
|
Loading…
Reference in a new issue