xkblayout-state/Makefile

27 lines
519 B
Makefile
Raw Normal View History

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