feat: Makefile
This commit is contained in:
parent
ca9f8261bf
commit
845677abe1
2 changed files with 91 additions and 0 deletions
29
config.mk
Normal file
29
config.mk
Normal file
|
@ -0,0 +1,29 @@
|
|||
# feuille version
|
||||
VERSION = 1.0.0
|
||||
|
||||
# paths (customize them to fit your system)
|
||||
PREFIX = /usr/local
|
||||
MAN = $(PREFIX)/share/man
|
||||
|
||||
# includes and libs
|
||||
INCS = -I/usr/include -I.
|
||||
LIBS = -L/usr/lib -lc
|
||||
|
||||
# OpenBSD / FreeBSD (uncomment)
|
||||
#MAN = $(PREFIX)/man
|
||||
#INCS = -I/usr/share/include -I.
|
||||
#LIBS = -L/usr/share/lib -lc
|
||||
|
||||
# compiler
|
||||
CC = cc
|
||||
|
||||
# debug build
|
||||
CFLAGS = -g -std=c99 -Wall -Wextra -Wpedantic -Wno-sign-compare -DVERSION=\"$(VERSION)\" $(INCS)
|
||||
LDFLAGS = -g $(LIBS)
|
||||
|
||||
# release build
|
||||
CFLAGS$(DEBUG) = -std=c99 -Wall -Wextra -Wno-sign-compare -DVERSION=\"$(VERSION)\" -O3 $(INCS)
|
||||
LDFLAGS$(DEBUG) = -s $(LIBS)
|
||||
|
||||
# static build (uncomment)
|
||||
#LD_FLAGS += -static
|
Reference in a new issue