xkblayout-state/Makefile
Karl Linden 06a972be33
Fix linking with --as-needed.
Also remove all hardcoding from the Makefile.
2017-10-28 15:16:14 +02:00

27 lines
513 B
Makefile

CXXFLAGS ?= -O2
PREFIX ?= /usr/local
headers := XKeyboard.h X11Exception.h
sources := XKeyboard.cpp wrapper.cpp
objects := $(sources:.cpp=.o)
program := xkblayout-state
all: $(program)
$(objects): %.o: %.cpp $(headers)
$(CXX) $(CXXFLAGS) -Wall -c -o $@ $<
$(program): $(objects)
$(CXX) $(CXXFLAGS) -lX11 $(LDFLAGS) -o $@ $^
clean:
rm -f $(program) $(objects)
install: $(program)
install $(program) $(DESTDIR)$(PREFIX)/bin
dist:
tar cfa $(program)-v1b.tar.gz Makefile README.md $(headers) $(sources)