summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmaan Bhojwani <me@armaanb.net>2021-05-03 18:34:58 -0400
committerArmaan Bhojwani <me@armaanb.net>2021-05-03 18:36:47 -0400
commit5589a68f36a894629107babb0ab4524ffc997049 (patch)
tree7c7d3c835de55449455c72aff1e5009753f7b1c9
parent0fc6f0c3273ea144233ccc58ef212f46405eaa3d (diff)
downloadopendoas-5589a68f36a894629107babb0ab4524ffc997049.tar.gz
Convert Makefile to being POSIX compatible
-rw-r--r--.gitignore1
-rw-r--r--Makefile (renamed from GNUmakefile)14
2 files changed, 8 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index a5224e9..d7ea15a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@ doas
parse.c
version.h
+y.tab.h
*.a
*.d
diff --git a/GNUmakefile b/Makefile
index f19deab..8b0f258 100644
--- a/GNUmakefile
+++ b/Makefile
@@ -1,19 +1,19 @@
-PROG= doas
-MAN= doas.1 doas.conf.5
+PROG = doas
+MAN = doas.1 doas.conf.5
-SRCS= parse.y doas.c env.c
+SRCS = parse.y doas.c env.c
include config.mk
-override CFLAGS:=-I. -Ilibopenbsd -O2 -Wall -Wextra ${OS_CFLAGS} ${CFLAGS}
+CFLAGS := -I. -Ilibopenbsd -O2 -Wall -Wextra ${OS_CFLAGS} ${CFLAGS}
all: ${PROG}
-OBJS:= ${SRCS:.y=.c}
-OBJS:= ${OBJS:.c=.o}
+OBJS := ${SRCS:.y=.c}
+OBJS := ${OBJS:.c=.o}
${PROG}: ${OBJS}
- ${CC} ${CFLAGS} $^ -o $@ ${LDFLAGS} ${LDLIBS}
+ ${CC} ${CFLAGS} *.o -o $@ ${LDFLAGS} ${LDLIBS}
install: ${PROG} ${MAN}
mkdir -p -m 0755 ${DESTDIR}${BINDIR}