aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-08-20 11:00:05 +0000
committermerakor <cem@ckyln.com>2020-08-20 11:00:05 +0000
commit458d427842e3323c59bf7fa26427215ff404dc4d (patch)
treed0b26025e1969661066780952389813b657394fc /Makefile
parent9624232b837be04bfc9658b3ab82ac3f1aafc704 (diff)
downloadcpt-458d427842e3323c59bf7fa26427215ff404dc4d.tar.gz
Makefile: build getopt
FossilOrigin-Name: 26d43f95c87e7c1dce6f5d5412a289af04091d60098a7e12965cb798e67ae645
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 4ae4647..160ea4a 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,10 @@ OBJ = ${SRC:.c=.o}
BIN = ${SRC:.c=}
all: ${BIN}
+ifeq ($(SYSTEM_GETOPT),1)
+else
+ ${MAKE} -C getopt-ul
+endif
.c.o:
${CC} ${CFLAGS} -c -o $@ $<
@@ -15,12 +19,17 @@ ${BIN}: ${OBJ}
clean:
rm -f ${BIN} ${OBJ}
+ ${MAKE} -C getopt-ul clean
install: all
for bin in src/* ${BIN} contrib/*; do \
install -Dm755 $${bin} ${DESTDIR}${BINDIR}/$${bin##*/}; done
for man in man/*.1; do install -Dm644 $${man} ${DESTDIR}${MAN1}/$${man##*/}; done
for doc in doc/*; do install -Dm644 $${doc} ${DESTDIR}${CPTDOC}/$${doc##*/}; done
+ifeq ($(SYSTEM_GETOPT),1)
+else
+ ${MAKE} -C getopt-ul install
+endif
uninstall:
for bin in ${BIN} src/* contrib/*; do \