comparison utils/Makefile @ 11:3d6cfb615d90

add make install hierarchy
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 13 Dec 2023 05:16:12 +0000
parents 0b4d54289ef3
children 78319ed870dc
comparison
equal deleted inserted replaced
10:05a94b08c8e1 11:3d6cfb615d90
1 INSTALL_PREFIX= /opt/themwi
2
1 CC= gcc 3 CC= gcc
2 CFLAGS= -O2 -I../build-inc 4 CFLAGS= -O2 -I../build-inc
3 PROGS= themwi-check-own themwi-dump-numdb themwi-short-dial themwi-update-numdb 5 PROGS= themwi-check-own themwi-dump-numdb themwi-short-dial themwi-update-numdb
4 LIBNUMDB=../libnumdb/libnumdb.a 6 LIBNUMDB=../libnumdb/libnumdb.a
5 LIBUTIL=../libnumutil/libnumutil.a 7 LIBUTIL=../libnumutil/libnumutil.a
8 INSTBIN=${INSTALL_PREFIX}/bin
6 9
7 all: ${PROGS} 10 all: ${PROGS}
8 11
9 themwi-check-own: themwi-check-own.o ${LIBNUMDB} ${LIBUTIL} 12 themwi-check-own: themwi-check-own.o ${LIBNUMDB} ${LIBUTIL}
10 ${CC} -o $@ $@.o ${LIBNUMDB} ${LIBUTIL} 13 ${CC} -o $@ $@.o ${LIBNUMDB} ${LIBUTIL}
16 ${CC} -o $@ $@.o ${LIBNUMDB} ${LIBUTIL} 19 ${CC} -o $@ $@.o ${LIBNUMDB} ${LIBUTIL}
17 20
18 themwi-update-numdb: themwi-update-numdb.o ${LIBUTIL} 21 themwi-update-numdb: themwi-update-numdb.o ${LIBUTIL}
19 ${CC} -o $@ $@.o ${LIBUTIL} 22 ${CC} -o $@ $@.o ${LIBUTIL}
20 23
24 install:
25 mkdir -p ${INSTBIN}
26 install -c -m 755 ${PROGS} ${INSTBIN}
27
21 clean: 28 clean:
22 rm -f *.o ${PROGS} errs 29 rm -f *.o ${PROGS} errs