mg

port of mg editor (openbsd to linux)
Log | Files | Refs | README

commit 78bd9206fa12499dab068f5b863933899ca1d7f0
parent 526faba60a8a7fce7a6313b75f000a19a037d7d6
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Mon, 24 Nov 2014 20:51:27 +0100

Makefile: update build

Diffstat:
Makefile | 21+++++++++++++++------
libopenbsd/Makefile | 6++++++
libutil/Makefile | 6++++++
3 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile @@ -2,8 +2,8 @@ PROG= mg -LDADD+= -lcurses -lutil -DPADD+= ${LIBCURSES} ${LIBUTIL} +#LDADD+= -lcurses -lutil +#DPADD+= ${LIBCURSES} ${LIBUTIL} # (Common) compile-time options: # @@ -26,14 +26,23 @@ SRCS= autoexec.c basic.c bell.c buffer.c cinfo.c dir.c display.c \ # SRCS+= cmode.c cscope.c dired.c grep.c tags.c # theo.c -CFLAGS += -DDEFFILEMODE=0666 -D__dead="" -I. +CFLAGS += -DDEFFILEMODE=0666 -D__dead="" -I. -Iinclude -Ilibutil +CFLAGS += -Os +LDFLAGS += -lcurses -Llibopenbsd -lopenbsd -Llibutil -lutil +LDFLAGS += -s -static -build: clean +build: openbsd util clean cc -c ${SRCS} ${CFLAGS} - cc -o ${PROG} *.o + cc -o ${PROG} *.o ${LDFLAGS} + +openbsd: + make -C libopenbsd + +util: + make -C libutil clean: - rm -f mg *.o + rm -f mg *.o libutil/*.o libopenbsd/*.o *.a #afterinstall: # ${INSTALL} -d ${DESTDIR}${DOCDIR}/mg diff --git a/libopenbsd/Makefile b/libopenbsd/Makefile @@ -0,0 +1,6 @@ +build: clean + cc -c *.c ${CFLAGS} + ar rc libopenbsd.a *.o + +clean: + rm -f *.o diff --git a/libutil/Makefile b/libutil/Makefile @@ -0,0 +1,6 @@ +build: clean + cc -c *.c ${CFLAGS} + ar rc libutil.a *.o + +clean: + rm -f *.o