From: Michael D. Lowis Date: Wed, 9 Nov 2016 00:21:12 +0000 (-0500) Subject: added config.mk to allow for easy tweaking of build options X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=820d2f625d8eb606c129b6dc2df1b2e2180c4bc7;p=projs%2Ftide.git added config.mk to allow for easy tweaking of build options --- diff --git a/Makefile b/Makefile index 71c69db..7ee3306 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,5 @@ -CC = c99 -LDFLAGS = -L/usr/X11/lib -lX11 -lXft -lfontconfig -CFLAGS = -Os $(INCS) -INCS = \ - -Iinc/ \ - -I/usr/X11/include \ - -I/usr/X11/include/freetype2 \ - -I/usr/include/freetype2 + +INCS = -Iinc/ LIBEDIT_OBJS = \ libedit/buf.o \ @@ -24,6 +18,8 @@ TEST_OBJS = \ tests/buf.o \ tests/utf8.o +include config.mk + all: xedit xpick test clean: @@ -36,9 +32,9 @@ xedit: xedit.o libx.a libedit.a xpick: xpick.o libx.a libedit.a libedit.a: $(LIBEDIT_OBJS) - $(AR) rcs $@ $^ + $(AR) $(ARFLAGS) $@ $^ libx.a: $(LIBX_OBJS) - $(AR) rcs $@ $^ + $(AR) $(ARFLAGS) $@ $^ unittests: $(TEST_OBJS) libedit.a diff --git a/config.mk b/config.mk new file mode 100644 index 0000000..fc63cfe --- /dev/null +++ b/config.mk @@ -0,0 +1,21 @@ +# Customize this file to fit your system + +# Compiler Setup +CC = c99 +CFLAGS = -Os $(INCS) + +# Linker Setup +LD = $(CC) +LDFLAGS = $(LIBS) -lX11 -lXft -lfontconfig + +# Archive Setup +AR = ar +ARFLAGS = rcs + +# OSX X11 Flags +INCS += -I/usr/X11/include \ + -I/usr/X11/include/freetype2 +LIBS += -L/usr/X11/lib + +# Linux Freetype2 Flags +INCS += -I/usr/include/freetype2