2017-10-08 20:06:57 +08:00
|
|
|
CXXFLAGS ?= -O2
|
|
|
|
|
|
|
|
PREFIX ?= /usr/local
|
|
|
|
|
2010-01-03 05:03:23 +08:00
|
|
|
all: xkblayout-state
|
|
|
|
|
|
|
|
XKeyboard.o: XKeyboard.cpp XKeyboard.h X11Exception.h
|
2017-10-08 20:06:57 +08:00
|
|
|
$(CXX) $(CXXFLAGS) -Wall -c -o $@ $<
|
2010-01-03 05:03:23 +08:00
|
|
|
|
|
|
|
wrapper.o: wrapper.cpp XKeyboard.h
|
2017-10-08 20:06:57 +08:00
|
|
|
$(CXX) $(CXXFLAGS) -Wall -c -o $@ $<
|
2010-01-03 05:03:23 +08:00
|
|
|
|
|
|
|
xkblayout-state: XKeyboard.o wrapper.o
|
2017-10-08 20:06:57 +08:00
|
|
|
$(CXX) $(CXXFLAGS) $(LDFLAGS) -lX11 -o xkblayout-state $^
|
2010-01-03 05:03:23 +08:00
|
|
|
|
2017-10-08 20:06:57 +08:00
|
|
|
clean:
|
2010-01-03 05:03:23 +08:00
|
|
|
rm -f xkblayout-state XKeyboard.o wrapper.o
|
2010-01-08 04:50:07 +08:00
|
|
|
|
2017-10-08 20:06:57 +08:00
|
|
|
install: xkblayout-state
|
|
|
|
install xkblayout-state $(DESTDIR)$(PREFIX)/bin
|
|
|
|
|
2010-01-08 04:50:07 +08:00
|
|
|
dist:
|
|
|
|
tar cfa xkblayout-state-v1b.tar.gz Makefile README.md wrapper.cpp X11Exception.h XKeyboard.cpp XKeyboard.h
|
|
|
|
|