2023-01-20 23:17:30 +01:00
|
|
|
# spmenu
|
|
|
|
|
|
|
|
# See LICENSE file for copyright and license details.
|
|
|
|
|
|
|
|
include options.mk
|
|
|
|
include host.mk
|
|
|
|
include toggle.mk
|
|
|
|
|
|
|
|
SRC = draw.c spmenu.c main.c
|
|
|
|
OBJ = $(SRC:.c=.o)
|
|
|
|
|
|
|
|
all: options spmenu
|
|
|
|
|
|
|
|
options:
|
|
|
|
@echo spmenu build options:
|
|
|
|
@echo "CFLAGS = $(CFLAGS)"
|
|
|
|
@echo "LDFLAGS = $(LDFLAGS)"
|
|
|
|
@echo "CC = $(CC)"
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) -c $(CFLAGS) -g $<
|
|
|
|
|
|
|
|
|
|
|
|
$(OBJ): arg.h options.h options.mk draw.h
|
|
|
|
|
|
|
|
spmenu: spmenu.o draw.o main.o
|
|
|
|
$(CC) -o $@ spmenu.o draw.o main.o $(LDFLAGS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f spmenu $(OBJ) spmenu-$(VERSION).tar.gz
|
|
|
|
|
|
|
|
dist: clean
|
|
|
|
mkdir -p spmenu-$(VERSION)
|
2023-01-20 23:29:18 +01:00
|
|
|
cp -rf LICENSE Makefile *.h *.mk *.c scripts/ docs/ spmenu-$(VERSION)
|
2023-01-20 23:17:30 +01:00
|
|
|
tar -cf spmenu-$(VERSION).tar spmenu-$(VERSION)
|
|
|
|
gzip spmenu-$(VERSION).tar
|
|
|
|
rm -rf spmenu-$(VERSION)
|
|
|
|
|
|
|
|
install: all
|
|
|
|
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
2023-01-20 23:28:33 +01:00
|
|
|
cp -rf spmenu scripts/* $(DESTDIR)$(PREFIX)/bin
|
2023-01-20 23:17:30 +01:00
|
|
|
chmod 755 $(DESTDIR)$(PREFIX)/bin/spmenu*
|
|
|
|
rm -f *.o
|
|
|
|
rm -f spmenu
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
$(DESTDIR)$(PREFIX)/bin/spmenu*\
|
|
|
|
|
|
|
|
help:
|
|
|
|
@echo install: Installs spmenu. You may need to run this as root.
|
|
|
|
@echo uninstall: Uninstalls spmenu. You may need to run this as root.
|
|
|
|
@echo help: Displays this help sheet.
|
|
|
|
|
|
|
|
.PHONY: all options clean dist install uninstall help
|