summaryrefslogtreecommitdiff
path: root/config.mk
diff options
context:
space:
mode:
authorLaslo Hunhold <dev@frign.de>2017-03-29 17:51:41 +0200
committerLaslo Hunhold <dev@frign.de>2017-03-29 17:51:41 +0200
commit416f39e3d68a6b12a05751930a609cfbbde483ff (patch)
tree1f50f1bbf8d64984894a9dd9350dfcc028e19acc /config.mk
parent2ae075c04cff633eddefd3c07363d60bd05a3129 (diff)
Overhaul Build-system
I didn't like the current Makefiles. They were too crufted and not elegant. Additionally, given I'm planning to put some utility functions into a util.{c|h}-prerequisite, I wrote this new Makefile with PREREQs in mind.
Diffstat (limited to 'config.mk')
-rw-r--r--config.mk30
1 files changed, 5 insertions, 25 deletions
diff --git a/config.mk b/config.mk
index 5fde97e..93988c4 100644
--- a/config.mk
+++ b/config.mk
@@ -7,33 +7,13 @@ VERSION = 2
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/man
-PNGLIB = /usr/local/lib
-PNGINC = /usr/local/include
-
-JPGLIB = /usr/local/lib
-JPGINC = /usr/local/include
-
-INCS =
-LIBS =
-
# flags
CPPFLAGS = -D_DEFAULT_SOURCE
-CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS}
-LDFLAGS = -s ${LIBS}
+CFLAGS = -std=c89 -pedantic -Wall -Os
+LDFLAGS = -s
+
+png2ff ff2png: LDFLAGS += -lpng
+jpg2ff ff2jpg: LDFLAGS += -ljpeg
# compiler and linker
CC = cc
-
-# flags per tool.
-
-png2ff-CFLAGS := -I${PNGINC}
-png2ff-LDFLAGS := -L${PNGLIB} -lpng
-
-ff2png-CFLAGS := -I${PNGINC}
-ff2png-LDFLAGS := -L${PNGLIB} -lpng
-
-jpg2ff-CFLAGS := -I${JPGINC}
-jpg2ff-LDFLAGS := -L${JPGLIB} -ljpeg
-
-ff2jpg-CFLAGS := -I${JPGINC}
-ff2jpg-LDFLAGS := -L${JPGLIB} -ljpeg