pinosaur
/
surf.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Makefile: include common to webext
[surf.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
6a4906e
..
0e322d6
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-4,9
+4,11
@@
include config.mk
include config.mk
-SRC = surf.c
common.c
-OBJ = $(SRC:.c=.o)
+SRC = surf.c
+CSRC = common.c
WEBEXTSRC = libsurf-webext.c
WEBEXTSRC = libsurf-webext.c
+OBJ = $(SRC:.c=.o)
+COBJ = $(CSRC:.c=.o)
WEBEXTOBJ = $(WEBEXTSRC:.c=.o)
all: options libsurf-webext.so surf
WEBEXTOBJ = $(WEBEXTSRC:.c=.o)
all: options libsurf-webext.so surf
@@
-24,19
+26,22
@@
options:
config.h:
cp config.def.h $@
config.h:
cp config.def.h $@
-$(OBJ): config.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):
config.h config.mk
+$(WEBEXTOBJ):
$(WEBEXTSRC)
$(CC) $(WEBEXTCFLAGS) $(CFLAGS) -c $(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) $(SURFLD
LAGS) $(LDFLAGS) -o $@ $(
OBJ) $(LIBS)
+surf: $(OBJ)
$(COBJ)
+ $(CC) $(SURFLD
FLAGS) $(LDFLAGS) -o $@ $(OBJ) $(C
OBJ) $(LIBS)
clean:
clean:
- rm -f surf $(OBJ)
+ rm -f surf $(OBJ)
$(OBJ)
rm -f libsurf-webext.so $(WEBEXTOBJ)
distclean: clean
rm -f libsurf-webext.so $(WEBEXTOBJ)
distclean: clean
@@
-57,7
+62,7
@@
install: all
chmod 755 $(DESTDIR)$(PREFIX)/bin/surf
mkdir -p $(DESTDIR)$(LIBDIR)
cp -f libsurf-webext.so $(DESTDIR)$(LIBDIR)
chmod 755 $(DESTDIR)$(PREFIX)/bin/surf
mkdir -p $(DESTDIR)$(LIBDIR)
cp -f libsurf-webext.so $(DESTDIR)$(LIBDIR)
- chmod 644 $(DESTDIR)$(LIBDIR)/
bin/
libsurf-webext.so
+ chmod 644 $(DESTDIR)$(LIBDIR)/libsurf-webext.so
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
sed "s/VERSION/$(VERSION)/g" < surf.1 > $(DESTDIR)$(MANPREFIX)/man1/surf.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/surf.1
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
sed "s/VERSION/$(VERSION)/g" < surf.1 > $(DESTDIR)$(MANPREFIX)/man1/surf.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/surf.1