freebsd-nq/contrib/bsddialog/GNUMakefile
Baptiste Daroussin c76f07938c Add 'contrib/bsddialog/' from commit '857c66bb5f3c5651b012beb1b5ea6ba39354ea94'
git-subtree-dir: contrib/bsddialog
git-subtree-mainline: a46722b580
git-subtree-split: 857c66bb5f
2021-11-24 11:03:17 +01:00

29 lines
609 B
Plaintext

# PUBLIC DOMAIN - NO WARRANTY, see:
# <http://creativecommons.org/publicdomain/zero/1.0/>
#
# Written by Alfonso Sabato Siciliano
OUTPUT= bsddialog
SOURCES= bsddialog.c
OBJECTS= $(SOURCES:.c=.o)
LIBPATH= ./lib
LIBBSDDIALOG= $(LIBPATH)/libbsddialog.so
CFLAGS= -g -Wall -I$(LIBPATH)
LDFLAGS= -Wl,-rpath=$(LIBPATH) -L$(LIBPATH) -lbsddialog
RM = rm -f
all : $(OUTPUT)
$(OUTPUT): $(LIBBSDDIALOG) $(OBJECTS)
$(CC) $^ -o $@ $(LDFLAGS)
${LIBBSDDIALOG}:
make -C ${LIBPATH} -f GNUMakefile
%.o: %.c $(LIBBSDDIALOG)
$(CC) $(CFLAGS) -c $<
clean:
make -C ${LIBPATH} -f GNUMakefile clean
$(RM) $(OUTPUT) *.o *~