diff options
author | Quentin Rameau <quinq@fifth.space> | 2019-02-06 10:27:01 +0100 |
---|---|---|
committer | Quentin Rameau <quinq@fifth.space> | 2019-02-06 10:53:05 +0100 |
commit | 890b2fc3960b76086a9c2b645d0592135f7d5284 (patch) | |
tree | 614db3dde51ce13335dfde04d6da6f10fe7d8d37 | |
parent | b9cd3bb0bc3e897a44c8637b0da0fe0e28fa21c6 (diff) | |
download | surf-890b2fc3960b76086a9c2b645d0592135f7d5284.tar.gz surf-890b2fc3960b76086a9c2b645d0592135f7d5284.tar.bz2 surf-890b2fc3960b76086a9c2b645d0592135f7d5284.zip |
Makefile: include common to webext
-rw-r--r-- | Makefile | 21 | ||||
-rw-r--r-- | config.mk | 2 |
2 files changed, 14 insertions, 9 deletions
@@ -4,9 +4,11 @@ include config.mk -SRC = surf.c common.c -OBJ = $(SRC:.c=.o) +SRC = surf.c +CSRC = common.c WEBEXTSRC = libsurf-webext.c +OBJ = $(SRC:.c=.o) +COBJ = $(CSRC:.c=.o) WEBEXTOBJ = $(WEBEXTSRC:.c=.o) all: options libsurf-webext.so surf @@ -25,18 +27,21 @@ config.h: cp config.def.h $@ $(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) -libsurf-webext.so: $(WEBEXTOBJ) - $(CC) -shared -Wl,-soname,$@ $(LDFLAGS) -o $@ $< $(WEBEXTLIBS) -lc +libsurf-webext.so: $(WEBEXTOBJ) $(COBJ) + $(CC) -shared -Wl,-soname,$@ $(LDFLAGS) -o $@ \ + $(WEBEXTOBJ) $(COBJ) $(WEBEXTLIBS) -surf: $(OBJ) - $(CC) $(SURFLDFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) +surf: $(OBJ) $(COBJ) + $(CC) $(SURFLDFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(COBJ) $(LIBS) clean: - rm -f surf $(OBJ) + rm -f surf $(OBJ) $(OBJ) rm -f libsurf-webext.so $(WEBEXTOBJ) distclean: clean @@ -24,7 +24,7 @@ LIBS = $(X11LIB) $(GTKLIB) -lgthread-2.0 # flags CPPFLAGS = -DVERSION=\"$(VERSION)\" -DWEBEXTDIR=\"$(LIBDIR)\" \ -D_DEFAULT_SOURCE -DGCR_API_SUBJECT_TO_CHANGE -SURFCFLAGS = $(INCS) $(CPPFLAGS) +SURFCFLAGS = $(INCS) $(CPPFLAGS) -fPIC WEBEXTCFLAGS = -fPIC $(WEBEXTINC) # compiler |