Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Oliver Anhuth
committed
Apr 19, 2018
1 parent
f969941
commit 9c8fec7
Showing
2 changed files
with
25 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ aur/ | |
|
||
# Prerequisites | ||
*.d | ||
*.dep | ||
|
||
# Compiled Object files | ||
*.slo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,33 @@ | ||
.PHONY: all clean | ||
SOURCES = main.cpp winctl.cpp | ||
TARGET = winctl | ||
|
||
CXXFLAGS = -std=c++14 -Wall -O3 | ||
CXXFLAGS += $(shell pkg-config --cflags libwnck-3.0) | ||
CXXFLAGS += $(shell pkg-config --cflags gdk-3.0) | ||
CXXFLAGS += $(shell pkg-config --cflags lua) | ||
CXXFLAGS += $(shell pkg-config --cflags x11) | ||
CXXFLAGS += ${shell pkg-config --cflags libwnck-3.0} | ||
CXXFLAGS += ${shell pkg-config --cflags gdk-3.0} | ||
CXXFLAGS += ${shell pkg-config --cflags lua} | ||
CXXFLAGS += ${shell pkg-config --cflags x11} | ||
|
||
LDFLAGS = | ||
LDFLAGS += $(shell pkg-config --libs libwnck-3.0) | ||
LDFLAGS += $(shell pkg-config --libs gdk-3.0) | ||
LDFLAGS += $(shell pkg-config --libs lua) | ||
LDFLAGS += $(shell pkg-config --libs x11) | ||
LDFLAGS += ${shell pkg-config --libs libwnck-3.0} | ||
LDFLAGS += ${shell pkg-config --libs gdk-3.0} | ||
LDFLAGS += ${shell pkg-config --libs lua} | ||
LDFLAGS += ${shell pkg-config --libs x11} | ||
|
||
OBJS = ${patsubst %.cpp,%.o,${SOURCES}} | ||
DEPS = ${patsubst %.cpp,%.o.dep,${SOURCES}} | ||
|
||
${TARGET}: ${OBJS} | ||
${CXX} -o $@ ${OBJS} ${LDFLAGS} | ||
|
||
winctl: arg_parse.h lua.h winctl.h winctl.cpp main.cpp | ||
${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ main.cpp winctl.cpp | ||
.cpp.o: $(SOURCES) | ||
${CXX} ${CXXFLAGS} -c $< -o $@ | ||
@${CXX} ${CXXFLAGS} -MP -MT $@ -MF $@.dep -MM $< | ||
|
||
-include $(DEPS) | ||
|
||
.PHONY: all clean | ||
|
||
all: winctl | ||
|
||
clean: | ||
-rm winctl | ||
-rm -f ${TARGET} *.o *.o.dep |