diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2024-01-26 21:33:41 -0500 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2024-01-26 21:33:41 -0500 |
commit | 504360e484270b0c54a69a49341f3c1693cc61a8 (patch) | |
tree | 1b74ff4c56578e634113251cb4e7e171b9eb08b8 | |
parent | 37b838f4558691e16afd3c2d940947186c8bc13c (diff) |
compiles differently for each machine
-rw-r--r-- | Makefile | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -3,13 +3,23 @@ include config.mk +# Determine the machine +MACHINE := $(shell uname -n) + +# Set configuration flags based on the machine +ifeq ($(MACHINE), battlestation) + CONFIG_FLAG = -D_HOST_BATTLESTATION +else + CONFIG_FLAG = -D_HOST_DEFAULT +endif + SRC = drw.c dwm.c util.c OBJ = ${SRC:.c=.o} all: dwm .c.o: - ${CC} -c ${CFLAGS} $< + ${CC} -c ${CFLAGS} ${CONFIG_FLAG} $< ${OBJ}: config.h config.mk @@ -43,3 +53,4 @@ uninstall: ${DESTDIR}${MANPREFIX}/man1/dwm.1 .PHONY: all clean dist install uninstall + |