Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit863073d9888c53959306e893bf2dfdcf32eb3334 (patch)
Author
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2020-02-09 19:41:46 +0100
Committer
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2020-02-09 19:42:04 +0100
Files0b9e57d69961f0d8484b846928ed9021dc4c970d
goodwolf-863073d9888c53959306e893bf2dfdcf32eb3334.tar
goodwolf-863073d9888c53959306e893bf2dfdcf32eb3334.tar.gz
goodwolf-863073d9888c53959306e893bf2dfdcf32eb3334.zip
Parentdbbffb97184cf4ef7153471fe6e6cdbd01e8d6ff (diff)
Makefile: Fixup flags by removing .POSIX
The Makefile is still POSIX with few extensions but .POSIX at the start got removed to avoid CC being set to c99 which fails as the code is in C11.
1 files changed, 8 insertions, 10 deletions
-rw-r--r--Makefile18
diff --git a/Makefile b/Makefile
index c6092c6..0caf4b4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,9 @@
-.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
+PACKAGE = Badwolf
VERSION = 0.5.0-rc.1
VERSION_FULL = $(VERSION)`./version.sh`
@@ -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,9 +29,9 @@ 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)
@@ -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)