From 5589a68f36a894629107babb0ab4524ffc997049 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Mon, 3 May 2021 18:34:58 -0400 Subject: [PATCH] Convert Makefile to being POSIX compatible --- .gitignore | 1 + GNUmakefile => Makefile | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) rename GNUmakefile => Makefile (74%) 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 similarity index 74% rename from GNUmakefile rename to 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} -- 2.39.2