suckless_dictpopup/Makefile

44 lines
819 B
Makefile
Raw Normal View History

2023-05-10 17:47:42 +00:00
include config.mk
2023-05-09 10:42:03 +00:00
2023-05-28 11:15:50 +00:00
SRC = popup.c format_output.c
2023-05-10 17:47:42 +00:00
OBJ = $(SRC:.c=.o)
2023-05-09 10:42:03 +00:00
2023-05-28 11:15:50 +00:00
all: options dictpopup
2023-05-09 10:42:03 +00:00
2023-05-10 17:47:42 +00:00
options:
@echo popup build options:
@echo "CFLAGS = $(CFLAGS)"
@echo "LDFLAGS = $(LDFLAGS)"
@echo "CC = $(CC)"
2023-05-09 10:42:03 +00:00
2023-05-28 11:15:50 +00:00
config.h:
cp config.def.h config.h
2023-05-10 17:47:42 +00:00
.c.o:
$(CC) -c $(CFLAGS) $<
2023-05-28 11:15:50 +00:00
popup.o: config.h
$(OBJ): config.h config.mk
dictpopup: $(OBJ)
$(CC) -o format_output format_output.o
$(CC) -o popup popup.o $(LDFLAGS)
clean:
rm -f popup $(OBJ) format_output
2023-05-09 10:42:03 +00:00
2023-05-10 17:52:09 +00:00
install: all
2023-05-09 10:42:03 +00:00
mkdir -p ${DESTDIR}${PREFIX}/bin
2023-05-10 17:52:09 +00:00
cp -f popup ${DESTDIR}${PREFIX}/bin
2023-05-28 11:15:50 +00:00
cp -f dictpopup ${DESTDIR}${PREFIX}/bin
cp -f format_output ${DESTDIR}${PREFIX}/bin
2023-05-09 10:42:03 +00:00
uninstall:
2023-05-10 17:52:09 +00:00
rm -f ${DESTDIR}${PREFIX}/bin/popup
2023-05-28 11:15:50 +00:00
rm -f ${DESTDIR}${PREFIX}/bin/dictpopup
rm -f ${DESTDIR}${PREFIX}/bin/format_output
2023-05-09 10:42:03 +00:00
2023-05-28 11:15:50 +00:00
.PHONY: all options clean install uninstall