aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-01-21 11:57:46 +0000
committerOmar Polo <op@omarpolo.com>2021-01-21 11:57:46 +0000
commit12042ad7003375b746b4e2bccbf33ae7a90cbb98 (patch)
treec5d093736027b6f6ee9f7034c9604d924027a080 /Makefile
parent338f06f4e569807582f005f5804ca3abc412b255 (diff)
add a configure script and some compat
tested on openbsd, alpine and void
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 7 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 75ac470..7cb798d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,11 @@
-CC = cc
-CFLAGS = -Wall -Wextra -g
-LDFLAGS = -ltls
-LEX = lex
-YACC = yacc
-
-PREFIX = /usr/local
+.PHONY: all static clean test install
-# /usr/local/lib on FreeBSD
-LIBDIR = /usr/lib/
+all: Makefile.local gmid TAGS
-.PHONY: all static clean test install
+Makefile.local: configure
+ ./configure
-all: gmid TAGS
+include Makefile.local
lex.yy.c: lex.l y.tab.c
${LEX} lex.l
@@ -20,7 +14,7 @@ y.tab.c: parse.y
${YACC} -b y -d parse.y
SRCS = gmid.c iri.c utf8.c ex.c server.c sandbox.c mime.c
-OBJS = ${SRCS:.c=.o} lex.yy.o y.tab.o
+OBJS = ${SRCS:.c=.o} lex.yy.o y.tab.o ${COMPAT}
gmid: ${OBJS}
${CC} ${OBJS} -o gmid ${LDFLAGS}
@@ -36,6 +30,7 @@ TAGS: ${SRCS}
clean:
rm -f *.o lex.yy.c y.tab.c y.tab.h y.output gmid iri_test
+ rm -f Makefile.local
iri_test: iri_test.o iri.o utf8.o
${CC} iri_test.o iri.o utf8.o -o iri_test ${LDFLAGS}