-
-
Save Anskrevy/52fa06719ad204cc99eb190bf20ddd84 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VERSION = 0.0.1 | |
# paths | |
X11INC = /usr/X11R6/include | |
X11LIB = /usr/X11R6/lib | |
# freetype | |
FREETYPELIBS = -lfontconfig -lXft | |
FREETYPEINC = /usr/include/freetype2 | |
# OpenBSD (uncomment) | |
#FREETYPEINC = ${X11INC}/freetype2 | |
# includes and libs | |
INCS = -I${X11INC} -I${FREETYPEINC} | |
LIBS = -L${X11LIB} -lX11 ${FREETYPELIBS} -lXrender | |
# flags | |
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" | |
CFLAGS = -g -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS} | |
LDFLAGS = ${LIBS} | |
# compiler and linker | |
CC = cc | |
OUT = xfonts | |
SRC = xfonts.c | |
OBJ = ${SRC:.c=.o} | |
include config.mk | |
all: options ${OUT} | |
options: | |
@echo ${OUT} build options: | |
@echo "CFLAGS = ${CFLAGS}" | |
@echo "LDFLAGS = ${LDFLAGS}" | |
@echo "CC = ${CC}" | |
@echo "SRC = ${SRC}" | |
%.o:%.c | |
${CC} -c ${CFLAGS} -o $@ $< | |
${OBJ}: config.mk | |
${OUT}: ${OBJ} | |
${CC} -o $@ ${OBJ} ${LDFLAGS} | |
.PHONY: all options |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment