2021-11-16 18:00:30 -05:00
|
|
|
all: polytreewm
|
|
|
|
|
2021-11-16 18:05:40 -05:00
|
|
|
include config/1-generated.mk
|
2021-11-16 18:07:04 -05:00
|
|
|
include config/2-conditionals.mk
|
|
|
|
include config/3-defvars.mk
|
2021-11-16 17:35:52 -05:00
|
|
|
|
2021-11-16 18:16:14 -05:00
|
|
|
CONFIGMKS_TO_REMOVE = \
|
2021-11-16 18:05:40 -05:00
|
|
|
config/1-generated.mk \
|
2021-11-16 18:16:14 -05:00
|
|
|
config/2-conditionals.mk
|
|
|
|
|
|
|
|
CONFIGMKS = \
|
|
|
|
$(CONFIGMKS_TO_REMOVE) \
|
2021-11-16 18:07:04 -05:00
|
|
|
config/3-defvars.mk
|
2021-11-16 14:48:06 -05:00
|
|
|
|
2021-11-16 17:02:06 -05:00
|
|
|
VERSION = 6.2
|
2006-07-10 10:38:18 -04:00
|
|
|
|
2021-11-16 21:34:53 -05:00
|
|
|
MODULES_SRC = \
|
2021-11-16 12:35:13 -05:00
|
|
|
src/atoms.c \
|
2021-11-18 10:37:49 -05:00
|
|
|
src/constraints.c \
|
2021-11-16 12:35:13 -05:00
|
|
|
src/drw.c \
|
2021-11-20 20:29:09 -05:00
|
|
|
src/dwm.c \
|
2021-12-04 12:14:07 -05:00
|
|
|
src/geom.c \
|
2021-11-16 12:35:13 -05:00
|
|
|
src/helpers.c \
|
|
|
|
src/layouts.c \
|
|
|
|
src/settings.c \
|
|
|
|
src/spawn.c \
|
2021-11-20 14:34:34 -05:00
|
|
|
src/state.c \
|
2021-11-16 21:56:19 -05:00
|
|
|
src/unit.c \
|
2021-11-21 23:07:13 -05:00
|
|
|
src/util.c \
|
|
|
|
src/xbase.c
|
2021-11-16 12:35:13 -05:00
|
|
|
|
|
|
|
DWM_SRC = \
|
|
|
|
src/dwm/handlers.c \
|
|
|
|
src/dwm/layouts.c \
|
2021-11-17 11:59:08 -05:00
|
|
|
src/dwm/xerror.c
|
2006-07-12 19:30:55 -04:00
|
|
|
|
2021-11-16 21:34:53 -05:00
|
|
|
MODULES_HDR = $(MODULES_SRC:.c=.h)
|
|
|
|
DWM_HDR = $(DWM_SRC:.c=.h)
|
|
|
|
|
2021-11-20 20:29:09 -05:00
|
|
|
SRC = $(MODULES_SRC) src/main.c
|
2021-11-20 20:49:30 -05:00
|
|
|
HDR = $(MODULES_HDR) src/main.h src/config.def.h
|
2021-11-16 21:34:53 -05:00
|
|
|
|
|
|
|
OBJ = $(SRC:.c=.o)
|
2021-11-16 10:03:26 -05:00
|
|
|
|
2021-11-16 21:34:53 -05:00
|
|
|
polytreewm: $(OBJ)
|
|
|
|
$(CC) -o $@ $(OBJ) $(LDFLAGS)
|
2021-11-16 12:35:13 -05:00
|
|
|
|
2021-11-12 16:48:06 -05:00
|
|
|
%.o: %.c
|
2021-11-16 21:34:53 -05:00
|
|
|
$(CC) -c $< -o $@ $(CFLAGS)
|
2006-07-10 10:38:18 -04:00
|
|
|
|
2021-11-16 21:34:53 -05:00
|
|
|
dwm.o: $(DWM_SRC) $(DWM_HDR)
|
|
|
|
$(OBJ): $(CONFIGMKS) $(HDR)
|
2006-07-10 10:38:18 -04:00
|
|
|
|
|
|
|
clean:
|
2021-11-16 21:34:53 -05:00
|
|
|
rm -f polytreewm $(OBJ)
|
2006-07-10 10:49:43 -04:00
|
|
|
|
2021-11-16 17:02:06 -05:00
|
|
|
distclean: clean
|
2021-11-16 18:16:14 -05:00
|
|
|
rm -f $(CONFIGMKS_TO_REMOVE)
|
2021-11-16 17:02:06 -05:00
|
|
|
|
2006-07-10 10:49:43 -04:00
|
|
|
install: all
|
2021-11-16 21:34:53 -05:00
|
|
|
mkdir -p $(DESTDIR)$(BINDIR)
|
|
|
|
cp -f polytreewm $(DESTDIR)$(BINDIR)
|
|
|
|
chmod 755 $(DESTDIR)$(BINDIR)/polytreewm
|
2021-11-12 03:42:58 -05:00
|
|
|
|
2021-11-16 21:34:53 -05:00
|
|
|
mkdir -p $(DESTDIR)$(MANDIR)/man1
|
|
|
|
sed "s/VERSION/$(VERSION)/g" < polytreewm.1 > $(DESTDIR)$(MANDIR)/man1/polytreewm.1
|
|
|
|
chmod 644 $(DESTDIR)$(MANDIR)/man1/polytreewm.1
|
2006-07-10 10:49:43 -04:00
|
|
|
|
|
|
|
uninstall:
|
2021-11-12 03:42:58 -05:00
|
|
|
rm -f \
|
2021-11-16 21:34:53 -05:00
|
|
|
$(DESTDIR)$(BINDIR)/polytreewm \
|
|
|
|
$(DESTDIR)$(MANDIR)/man1/polytreewm.1
|
2006-08-03 04:58:29 -04:00
|
|
|
|
2021-11-16 18:00:30 -05:00
|
|
|
.PHONY: all clean distclean install uninstall
|