Summary Files Commits Branches @commit @diff @stats
path: root / Makefile
diff options
context:
space:
mode:
Commit3cff0fe5d4a6b8e28f75502979f5b19783f6bb3d (patch)
Author
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2020-02-09 20:13:13 +0100
Committer
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2020-02-09 20:17:49 +0100
Filesb664190fafe3e2d278bc2a5515ec1c9c8c24a7e8 /Makefile
goodwolf-0.5.0.tar
goodwolf-0.5.0.tar.gz
goodwolf-0.5.0.zip
Parent59f1c5d4dbcebc48d1d408dba0be2959d7970167 (diff)
Parent8af89b019a5b1da7549a819049e7908d0d106017 (diff)
Merge branch 'release-0.5' for release 0.5.0 v0.5.0
1 files changed, 10 insertions, 12 deletions
-rw-r--r--Makefile22
diff --git a/Makefile b/Makefile
index c6092c6..0cc0a14 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,10 @@
-.POSIX:
-# POSIX Makefile with extensions common to *BSD and GNU such as:
+# POSIX-ish Makefile with extensions common to *BSD and GNU such as:
# - Usage of backticks for shell evaluation
# - Usage of ?= for defining variables when not already defined
# - Usage of += for appending to a variable
-PACKAGE = Badwolf
-VERSION = 0.5.0-rc.1
+PACKAGE = Badwolf
+VERSION = 0.5.0
VERSION_FULL = $(VERSION)`./version.sh`
PREFIX ?= /usr/local
@@ -16,12 +15,11 @@ DATADIR ?= $(PREFIX)/share/badwolf
APPSDIR ?= $(PREFIX)/share/applications
CC ?= cc
+CFLAGS ?= -g -Wall -Wextra -Wconversion -Wsign-conversion -O2
DBG ?=
PKGCONFIG ?= pkg-config
MSGFMT ?= msgfmt
-CFLAGS ?= -g -Wall -Wextra -Wconversion -Wsign-conversion -O2
-
DEPS = gtk+-3.0 webkit2gtk-4.0 libsoup-2.4
SRCS = uri.c uri_test.c keybindings.c badwolf.c
OBJS = uri.o keybindings.o badwolf.o
@@ -31,11 +29,11 @@ EXE_test = uri_test
TRANS = fr.mo pt_BR.mo
DOCS = usr.bin.badwolf README.md KnowledgeBase.md
-CFLAGS += -DDATADIR=\"$(DATADIR)\" -DPACKAGE=\"$(PACKAGE)\" -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION_FULL)\"
-CFLAGS += `$(PKGCONFIG) --cflags $(DEPS)`
-LIBS = `$(PKGCONFIG) --libs $(DEPS)`
+CDEPS = -DDATADIR=\"$(DATADIR)\" -DPACKAGE=\"$(PACKAGE)\" -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION_FULL)\"
+CDEPS += `$(PKGCONFIG) --cflags $(DEPS)`
+LIBS = `$(PKGCONFIG) --libs $(DEPS)`
-all: $(EXE) $(TRANS)
+all: $(EXE) $(TRANS) po/messages.pot
po/messages.pot: $(SRCS)
xgettext --keyword=_ --language=C --from-code=UTF-8 -o $@ --add-comments --sort-output --copyright-holder="Badwolf Authors <https://hacktivis.me/projects/badwolf>" --package-name="$(PACKAGE)" --package-version="$(VERSION_FULL)" --msgid-bugs-address="contact+badwolf-msgid@hacktivis.me" $(SRCS)
@@ -51,10 +49,10 @@ badwolf: $(OBJS)
$(CC) -std=c11 -o $@ $(OBJS) $(LDFLAGS) $(LIBS)
.c:
- $(CC) -std=c11 $(CFLAGS) $(LDFLAGS) $(LIBS) -o $@ $<
+ $(CC) -std=c11 $(CFLAGS) $(CDEPS) $(LDFLAGS) $(LIBS) -o $@ $<
.c.o:
- $(CC) -std=c11 $(CFLAGS) -c -o $@ $<
+ $(CC) -std=c11 $(CFLAGS) $(CDEPS) -c -o $@ $<
uri_test: uri.o uri_test.o
$(CC) -std=c11 -o $@ uri.o uri_test.o $(LDFLAGS) $(LIBS)