Makefile: include common to webext
This commit is contained in:
parent
b9cd3bb0bc
commit
890b2fc396
2 changed files with 14 additions and 9 deletions
21
Makefile
21
Makefile
|
@ -4,9 +4,11 @@
|
||||||
|
|
||||||
include config.mk
|
include config.mk
|
||||||
|
|
||||||
SRC = surf.c common.c
|
SRC = surf.c
|
||||||
OBJ = $(SRC:.c=.o)
|
CSRC = common.c
|
||||||
WEBEXTSRC = libsurf-webext.c
|
WEBEXTSRC = libsurf-webext.c
|
||||||
|
OBJ = $(SRC:.c=.o)
|
||||||
|
COBJ = $(CSRC:.c=.o)
|
||||||
WEBEXTOBJ = $(WEBEXTSRC:.c=.o)
|
WEBEXTOBJ = $(WEBEXTSRC:.c=.o)
|
||||||
|
|
||||||
all: options libsurf-webext.so surf
|
all: options libsurf-webext.so surf
|
||||||
|
@ -25,18 +27,21 @@ config.h:
|
||||||
cp config.def.h $@
|
cp config.def.h $@
|
||||||
|
|
||||||
$(OBJ): config.h common.h config.mk
|
$(OBJ): config.h common.h config.mk
|
||||||
|
$(COBJ): config.h common.h config.mk
|
||||||
|
$(WEBEXTOBJ): config.h common.h config.mk
|
||||||
|
|
||||||
$(WEBEXTOBJ): $(WEBEXTSRC) config.h common.h config.mk
|
$(WEBEXTOBJ): $(WEBEXTSRC)
|
||||||
$(CC) $(WEBEXTCFLAGS) $(CFLAGS) -c $(WEBEXTSRC)
|
$(CC) $(WEBEXTCFLAGS) $(CFLAGS) -c $(WEBEXTSRC)
|
||||||
|
|
||||||
libsurf-webext.so: $(WEBEXTOBJ)
|
libsurf-webext.so: $(WEBEXTOBJ) $(COBJ)
|
||||||
$(CC) -shared -Wl,-soname,$@ $(LDFLAGS) -o $@ $< $(WEBEXTLIBS) -lc
|
$(CC) -shared -Wl,-soname,$@ $(LDFLAGS) -o $@ \
|
||||||
|
$(WEBEXTOBJ) $(COBJ) $(WEBEXTLIBS)
|
||||||
|
|
||||||
surf: $(OBJ)
|
surf: $(OBJ) $(COBJ)
|
||||||
$(CC) $(SURFLDFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
|
$(CC) $(SURFLDFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(COBJ) $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f surf $(OBJ)
|
rm -f surf $(OBJ) $(OBJ)
|
||||||
rm -f libsurf-webext.so $(WEBEXTOBJ)
|
rm -f libsurf-webext.so $(WEBEXTOBJ)
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
|
|
|
@ -24,7 +24,7 @@ LIBS = $(X11LIB) $(GTKLIB) -lgthread-2.0
|
||||||
# flags
|
# flags
|
||||||
CPPFLAGS = -DVERSION=\"$(VERSION)\" -DWEBEXTDIR=\"$(LIBDIR)\" \
|
CPPFLAGS = -DVERSION=\"$(VERSION)\" -DWEBEXTDIR=\"$(LIBDIR)\" \
|
||||||
-D_DEFAULT_SOURCE -DGCR_API_SUBJECT_TO_CHANGE
|
-D_DEFAULT_SOURCE -DGCR_API_SUBJECT_TO_CHANGE
|
||||||
SURFCFLAGS = $(INCS) $(CPPFLAGS)
|
SURFCFLAGS = $(INCS) $(CPPFLAGS) -fPIC
|
||||||
WEBEXTCFLAGS = -fPIC $(WEBEXTINC)
|
WEBEXTCFLAGS = -fPIC $(WEBEXTINC)
|
||||||
|
|
||||||
# compiler
|
# compiler
|
||||||
|
|
Loading…
Reference in a new issue