diff options
author | Karel Kočí <cynerd@email.cz> | 2018-11-05 23:04:32 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-11-05 23:04:32 +0100 |
commit | d7f641d5dd6c099d4a9274a18fcfb89df00d4b4c (patch) | |
tree | fa46c7ec3902a9549393df154f24b25ef7517875 /Makefile | |
parent | 78d9d66ad6ce6455690670173623ad420d12170d (diff) | |
parent | 2b71a22755bae132a639fe10475a0d42e582d244 (diff) | |
download | surf-bda5433e84b99470681e1e3f67b7abd929750236.tar.gz surf-bda5433e84b99470681e1e3f67b7abd929750236.tar.bz2 surf-bda5433e84b99470681e1e3f67b7abd929750236.zip |
Merge branch 'surf-webkit2' into mysurfv2.0.7
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 94 |
1 files changed, 47 insertions, 47 deletions
@@ -4,72 +4,72 @@ include config.mk -SRC = surf.c +SRC = surf.c common.c OBJ = $(SRC:.c=.o) +WEBEXTSRC = libsurf-webext.c +WEBEXTOBJ = $(WEBEXTSRC:.c=.o) -all: options surf +all: options libsurf-webext.so surf options: @echo surf build options: - @echo "CFLAGS = $(SURF_CFLAGS)" - @echo "LDFLAGS = $(SURF_LDFLAGS)" - @echo "CC = $(CC)" + @echo "CC = $(CC)" + @echo "CFLAGS = $(SURFCFLAGS) $(CFLAGS)" + @echo "WEBEXTCFLAGS = $(WEBEXTCFLAGS) $(CFLAGS)" + @echo "LDFLAGS = $(LDFLAGS)" .c.o: - @echo CC -c $< - @$(CC) $(SURF_CFLAGS) -c $< - -$(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 + +$(WEBEXTOBJ): $(WEBEXTSRC) config.h common.h config.mk + $(CC) $(WEBEXTCFLAGS) $(CFLAGS) -c $(WEBEXTSRC) + +libsurf-webext.so: $(WEBEXTOBJ) + $(CC) -shared -Wl,-soname,$@ $(LDFLAGS) -o $@ $< $(WEBEXTLIBS) -lc surf: $(OBJ) - @echo CC -o $@ - @$(CC) $(SURF_CFLAGS) -o $@ $(OBJ) $(SURF_LDFLAGS) + $(CC) $(SURFLDLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) clean: - @echo cleaning - @rm -f surf $(OBJ) + rm -f surf $(OBJ) + rm -f libsurf-webext.so $(WEBEXTOBJ) distclean: clean - @echo cleaning dist - @rm -f config.h surf-$(VERSION).tar.gz + rm -f config.h surf-$(VERSION).tar.gz dist: distclean - @echo creating dist tarball - @mkdir -p surf-$(VERSION) - @cp -R LICENSE Makefile config.mk config.def.h README \ + 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) + 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 surf-menu to $(DESTDIR)$(PREFIX)/bin - @cp -f surf-menu $(DESTDIR)$(PREFIX)/bin - @chmod 755 $(DESTDIR)$(PREFIX)/bin/surf-menu - @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 - @echo installing desktop file to $(DESTDIR)/usr/share/applications - @mkdir -p $(DESTDIR)/usr/share/applications - @cp -f surf.desktop $(DESTDIR)/usr/share/applications/surf.desktop + mkdir -p $(DESTDIR)$(PREFIX)/bin + cp -f surf $(DESTDIR)$(PREFIX)/bin + chmod 755 $(DESTDIR)$(PREFIX)/bin/surf + cp -f surf-menu $(DESTDIR)$(PREFIX)/bin + chmod 755 $(DESTDIR)$(PREFIX)/bin/surf-menu + 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 - @rm -f $(DESTDIR)$(PREFIX)/bin/surf-menu - @echo removing manual page from $(DESTDIR)$(MANPREFIX)/man1 - @rm -f $(DESTDIR)$(MANPREFIX)/man1/surf.1 - @echo removing desktop page from $(DESTDIR)/usr/share/applications - @rm -f $(DESTDIR)/usr/share/applications/surf.desktop - -.PHONY: all options clean dist install uninstall + rm -f $(DESTDIR)$(PREFIX)/bin/surf + rm -f $(DESTDIR)$(PREFIX)/bin/surf-menu + rm -f $(DESTDIR)$(MANPREFIX)/man1/surf.1 + rm -f $(DESTDIR)$(LIBDIR)/libsurf-webext.so + - rmdir $(DESTDIR)$(LIBDIR) + +.SUFFIXES: .so .o .c +.PHONY: all options clean-dist clean dist install uninstall |