swim.git

Makefile

espurr
# swim - window manager
# Copyright (C) 2022-2023 ArcNyxx
# see LICENCE file for licensing information

.POSIX:

include config.mk

SRC = act.c bar.c conv.c draw.c evt.c func.c grab.c mon.c swim.c tile.c user.c util.c
HED =       bar.h conv.h draw.h       func.h grab.h mon.h swim.h tile.h user.h util.h
OBJ = $(SRC:.c=.o)

all: swim

$(OBJ): $(HED) config.mk

.c.o:
	$(CC) $(CFLAGS) -c $<

swim: $(OBJ)
	$(CC) $(OBJ) -o $@ $(LDFLAGS)

clean:
	rm -f swim $(OBJ)

install: all
	mkdir -p $(PREFIX)/bin $(MANPREFIX)/man1
	cp -f swim $(PREFIX)/bin
	chmod 755 $(PREFIX)/bin/swim
	sed 's/VERSION/$(VERSION)/g' < swim.1 > $(MANPREFIX)/man1/swim.1
	chmod 644 $(MANPREFIX)/man1/swim.1

uninstall:
	rm -f $(PREFIX)/bin/swim $(MANPREFIX)/man1/swim.1

.PHONY: all clean install uninstall