29 lines
647 B
Plaintext
29 lines
647 B
Plaintext
# PUBLIC DOMAIN - NO WARRANTY, see:
|
|
# <http://creativecommons.org/publicdomain/zero/1.0/>
|
|
#
|
|
# Written in 2021 by Alfonso Sabato Siciliano
|
|
|
|
OUTPUT= bsddialog
|
|
SOURCES= bsddialog.c
|
|
OBJECTS= $(SOURCES:.c=.o)
|
|
LIBPATH= ./lib
|
|
LIBBSDDIALOG= $(LIBPATH)/libbsddialog.so
|
|
CFLAGS= -Wall -Wextra -Wno-unused-parameter -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 *~
|