~armaan/opendoas

5589a68f36a894629107babb0ab4524ffc997049 — Armaan Bhojwani 2 months ago 0fc6f0c
Convert Makefile to being POSIX compatible
2 files changed, 8 insertions(+), 7 deletions(-)

M .gitignore
R GNUmakefile => Makefile
M .gitignore => .gitignore +1 -0
@@ 2,6 2,7 @@ doas

parse.c
version.h
y.tab.h

*.a
*.d

R GNUmakefile => Makefile +7 -7
@@ 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}