Summary Files Commits Branches @commit @diff @stats
path: root / Makefile
diff options
context:
space:
mode:
Commit667c807f6eebe09ba075f763f2642e5241d2ac84 (patch)
Author
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2021-10-02 19:06:14 +0200
Committer
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2021-10-02 19:06:14 +0200
Files1262fd4a5f08be5faeedde58b2f5200e20cba157 /Makefile
goodwolf-1.2.0.tar
goodwolf-1.2.0.tar.gz
goodwolf-1.2.0.zip
Parent762114dcc99d4e70a0472813ff41f77e44277bb8 (diff)
Parentf539edf6f68be78e7be36a94f5020a6193f58867 (diff)
Merge branch 'release-1.2' into missy for 1.2.0 v1.2.0
1 files changed, 10 insertions, 29 deletions
-rw-r--r--Makefile39
diff --git a/Makefile b/Makefile
index 2ec3a80..0ff8b3d 100644
--- a/Makefile
+++ b/Makefile
@@ -3,41 +3,21 @@
# - Usage of ?= for defining variables when not already defined
# - Usage of += for appending to a variable
-PACKAGE = Badwolf
-VERSION = 1.1.0
-VERSION_FULL = $(VERSION)`./version.sh`
+include config.mk
-PREFIX ?= /usr/local
-BINDIR ?= $(PREFIX)/bin
-MANDIR ?= $(PREFIX)/share/man
-DOCDIR ?= $(PREFIX)/share/doc/badwolf-$(VERSION)
-DATADIR ?= $(PREFIX)/share/badwolf
-APPSDIR ?= $(PREFIX)/share/applications
-
-CC ?= cc
-CFLAGS ?= -g -O2 -pie -fPIE -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wconversion -Wsign-conversion -O2 -Werror=implicit-function-declaration -Werror=implicit-int -Werror=vla
-DBG ?=
-PKGCONFIG ?= pkg-config
-MSGFMT ?= msgfmt
-INKSCAPE ?= inkscape
-
-# for i in 24 32 48 64 128 256; do echo icons/hicolor/${i}x${i}/apps/badwolf.png; done | tr '\n' ' '
-ICON_SIZES = icons/hicolor/24x24/apps/badwolf.png icons/hicolor/32x32/apps/badwolf.png icons/hicolor/48x48/apps/badwolf.png icons/hicolor/64x64/apps/badwolf.png icons/hicolor/128x128/apps/badwolf.png icons/hicolor/256x256/apps/badwolf.png
-
-DEPS = gtk+-3.0 webkit2gtk-4.0 libsoup-2.4 libxml-2.0
SRCS = bookmarks.c uri.c uri_test.c keybindings.c downloads.c badwolf.c
OBJS = bookmarks.o uri.o keybindings.o downloads.o badwolf.o
OBJS_test = uri_test.o
EXE = badwolf
EXE_test = uri_test
-TRANS = fr.mo pt_BR.mo tr.mo de.mo
+TRANS = fr.mo pt_BR.mo tr.mo de.mo vi.mo
DOCS = usr.bin.badwolf README.md KnowledgeBase.md interface.txt
-CDEPS = -DDATADIR=\"$(DATADIR)\" -DPACKAGE=\"$(PACKAGE)\" -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION_FULL)\"
-CDEPS += `$(PKGCONFIG) --cflags $(DEPS)`
-LIBS = `$(PKGCONFIG) --libs $(DEPS)`
+all: config.mk $(EXE) $(TRANS) po/messages.pot
-all: $(EXE) $(TRANS) po/messages.pot
+config.mk: configure
+ @echo "Error: You need to execute ./configure before running make"
+ @exit 1
icons: $(ICON_SIZES)
@@ -63,10 +43,10 @@ badwolf: $(OBJS)
$(CC) -std=c11 -o $@ $(OBJS) $(LDFLAGS) $(LIBS)
.c:
- $(CC) -std=c11 $(CFLAGS) $(CDEPS) $(LDFLAGS) $(LIBS) -o $@ $<
+ $(CC) -std=c11 $(CFLAGS) $(LDFLAGS) $(LIBS) -o $@ $<
.c.o:
- $(CC) -std=c11 $(CFLAGS) $(CDEPS) -c -o $@ $<
+ $(CC) -std=c11 $(CFLAGS) -c -o $@ $<
uri_test: uri.o uri_test.o
$(CC) -std=c11 -o $@ uri.o uri_test.o $(LDFLAGS) $(LIBS)
@@ -74,6 +54,7 @@ uri_test: uri.o uri_test.o
.PHONY: test
test: $(EXE_test)
+ $(MANDOC) -Tlint -Wunsupp,error,warning ./badwolf.1
.PHONY: install
install: all
@@ -94,7 +75,7 @@ install: all
.PHONY: clean
clean:
- rm -fr locale $(OBJS) $(OBJS_test) $(EXE) $(EXE_test)
+ rm -fr locale config.mk $(OBJS) $(OBJS_test) $(EXE) $(EXE_test)
format: *.c *.h
clang-format -style=file -assume-filename=.clang-format -i *.c *.h