Commit 8b4efba8 authored by Tinu Weber's avatar Tinu Weber
Browse files

New layout [THIS BREAKS EVERYTHING]

... but that's okay, since nobody's using it.
I mean - at least it still *compiles*!

"J.A.R.V.I.S. - we're back in hardware mode!"
parent 31a8063d
karuiwm
config.h
tags
build
# Makefile for karuiwm
# Compiler:
CC ?= gcc
......@@ -9,35 +7,54 @@ PREFIX = /usr/local
# Application name:
APPNAME = karuiwm
XINITRC = xinitrc
# Flags:
CFLAGS = -W -Wall -Wextra -pedantic -g
CFLAGS += -Wcast-align -Wcast-qual -Wconversion -Wwrite-strings -Wfloat-equal
CFLAGS += -Wlogical-op -Wpointer-arith -Wformat=2
CFLAGS += -Winit-self -Wuninitialized -Wmaybe-uninitialized
CFLAGS += -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes
CFLAGS += -Wshadow #-Wpadded
CFLAGS += -std=c99
CFLAGS += -Wpadded -Wshadow
CFLAGS += -std=c99 -O2
CFLAGS += $(shell pkg-config --cflags xinerama x11)
LIBS = $(shell pkg-config --libs xinerama x11)
BUILDDIR = build
SRCDIR = src
SOURCES = $(wildcard ${SRCDIR}/*.c)
OBJECTS = $(SOURCES:${SRCDIR}/%.c=${BUILDDIR}/%.o)
DEPENDS = $(OBJECTS:%.o=%.d)
# Default: Build application
all: $(APPNAME)
# Handy actions:
clean:
rm -rf ${BUILDDIR}
mrproper: clean
rm -f ${APPNAME}
install:
install ${APPNAME} ${PREFIX}/bin/${APPNAME}
uninstall:
rm -f ${PREFIX}/bin/${APPNAME}
xephyr:
xinit ./${APPNAME} -- $(shell which Xephyr) :1
# Build dependencies:
-include ${DEPENDS}
# Compile & Link:
$(APPNAME): karuiwm.c config.h layout.h
if [ ! -e config.h ]; then cp config.def.h config.h; fi
$(CC) ${CFLAGS} karuiwm.c ${LIBS} -o $@
$(BUILDDIR)/%.o: ${SRCDIR}/%.c
@if [ ! -d ${BUILDDIR} ]; then mkdir ${BUILDDIR}; fi
if [ ! -d $(shell dirname $@) ]; then mkdir $(shell dirname $@); fi
@printf "compiling \033[1m%s\033[0m ...\n" $@
$(CC) ${CFLAGS} -c $< -o $@
$(CC) ${CFLAGS} -MM -MT $@ $< > ${BUILDDIR}/$*.d
$(APPNAME): $(OBJECTS)
@printf "linking \033[1m%s\033[0m ...\n" $@
$(CC) ${LIBS} ${OBJECTS} -o $@
xephyr:
xinit ${XINITRC} -- $(shell which Xephyr) :1
# Phony targets:
.PHONY: all
......
......@@ -66,7 +66,7 @@ custom_shutdown()
/* place code here */
}
#define MODKEY Mod4Mask
#define MODKEY Mod1Mask
/* normal keys */
static Key const keys[] = {
......
exec ./karuiwm
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment