Skip to content

Commit

Permalink
add latest commits
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdotx committed Dec 18, 2019
1 parent 4946657 commit 8c9276e
Show file tree
Hide file tree
Showing 11 changed files with 2,706 additions and 413 deletions.
10 changes: 5 additions & 5 deletions FAQ.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Frequently Asked Questions

## Surf is starting up slowly. What might happen?
## Surf is starting up slowly. What might be causing this?

The first suspect for such a behaviour is the plugin handling. Run surf
on the commandline and see if there are errors because of »nspluginwrap‐
per« or failed RPCs to them. If that is true, go to ~/.mozilla/plugins
and try removing stale links to plugins not on your system anymore. This
The first suspect for such behaviour is the plugin handling. Run surf on
the commandline and see if there are errors because of “nspluginwrapper”
or failed RPCs to them. If that is true, go to ~/.mozilla/plugins and
try removing stale links to plugins not on your system anymore. This
will stop surf from trying to load them.

94 changes: 55 additions & 39 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,61 +1,77 @@
# surf - simple browser
# See LICENSE file for copyright and license details.
.POSIX:

include config.mk

SRC = surf.c
OBJ = ${SRC:.c=.o}
CSRC = common.c
WEBEXTSRC = libsurf-webext.c
OBJ = $(SRC:.c=.o)
COBJ = $(CSRC:.c=.o)
WEBEXTOBJ = $(WEBEXTSRC:.c=.o)

all: options surf
all: options libsurf-webext.so surf

options:
@echo surf build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
@echo "CC = $(CC)"
@echo "CFLAGS = $(SURFCFLAGS) $(CFLAGS)"
@echo "WEBEXTCFLAGS = $(WEBEXTCFLAGS) $(CFLAGS)"
@echo "LDFLAGS = $(LDFLAGS)"

.c.o:
@echo CC $<
@${CC} -c ${CFLAGS} $<

${OBJ}: config.h config.mk
$(CC) $(SURFCFLAGS) $(CFLAGS) -c $<

config.h:
@echo creating $@ from config.def.h
@cp config.def.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)
$(CC) $(WEBEXTCFLAGS) $(CFLAGS) -c $(WEBEXTSRC)

surf: ${OBJ}
@echo CC -o $@
@${CC} -o $@ surf.o ${LDFLAGS}
libsurf-webext.so: $(WEBEXTOBJ) $(COBJ)
$(CC) -shared -Wl,-soname,$@ $(LDFLAGS) -o $@ \
$(WEBEXTOBJ) $(COBJ) $(WEBEXTLIBS)

surf: $(OBJ) $(COBJ)
$(CC) $(SURFLDFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(COBJ) $(LIBS)

clean:
@echo cleaning
@rm -f surf ${OBJ} surf-${VERSION}.tar.gz

dist: clean
@echo creating dist tarball
@mkdir -p surf-${VERSION}
@cp -R LICENSE Makefile config.mk config.def.h README \
surf-open.sh arg.h TODO.md surf.png \
surf.1 ${SRC} surf-${VERSION}
@tar -cf surf-${VERSION}.tar surf-${VERSION}
@gzip surf-${VERSION}.tar
@rm -rf surf-${VERSION}
rm -f surf $(OBJ) $(COBJ)
rm -f libsurf-webext.so $(WEBEXTOBJ)

distclean: clean
rm -f config.h surf-$(VERSION).tar.gz

dist: distclean
mkdir -p surf-$(VERSION)
cp -R LICENSE Makefile config.mk config.def.h README \
surf-open.sh arg.h TODO.md surf.png \
surf.1 $(SRC) $(WEBEXTSRC) surf-$(VERSION)
tar -cf surf-$(VERSION).tar surf-$(VERSION)
gzip surf-$(VERSION).tar
rm -rf surf-$(VERSION)

install: all
@echo installing executable file to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${PREFIX}/bin
@cp -f surf ${DESTDIR}${PREFIX}/bin
@chmod 755 ${DESTDIR}${PREFIX}/bin/surf
@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
@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)$(PREFIX)/bin
cp -f surf $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/surf
mkdir -p $(DESTDIR)$(LIBDIR)
cp -f libsurf-webext.so $(DESTDIR)$(LIBDIR)
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

uninstall:
@echo removing executable file from ${DESTDIR}${PREFIX}/bin
@rm -f ${DESTDIR}${PREFIX}/bin/surf
@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
@rm -f ${DESTDIR}${MANPREFIX}/man1/surf.1
rm -f $(DESTDIR)$(PREFIX)/bin/surf
rm -f $(DESTDIR)$(MANPREFIX)/man1/surf.1
rm -f $(DESTDIR)$(LIBDIR)/libsurf-webext.so
- rmdir $(DESTDIR)$(LIBDIR)

.PHONY: all options clean dist install uninstall
.SUFFIXES: .so .o .c
.PHONY: all options clean-dist clean dist install uninstall
3 changes: 3 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ Patches
surf-websearch-20190510-d068a38.diff
surf-2.0-homepage.diff

Last implemented commit
-----------------------
2019-02-08 22:56 Fix vertical scroll directions in the config file efe
15 changes: 15 additions & 0 deletions common.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>

void
die(const char *errstr, ...)
{
va_list ap;

va_start(ap, errstr);
vfprintf(stderr, errstr, ap);
va_end(ap);
exit(1);
}

3 changes: 3 additions & 0 deletions common.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#define MSGBUFSZ 8

void die(char *, ...);
Loading

0 comments on commit 8c9276e

Please sign in to comment.