Makefile (712B)
1PREFIX ?= /usr/local 2BINDIR ?= /bin 3 4CFLAGS = -Wunused-variable -Wunused-function -g 5LDFLAGS = -Wl,-soname,xwrap.so -Wl,-init,winpl_init 6LIB_FLAGS = $(CFLAGS) $(LDFLAGS) -nostartfiles -fPIC -shared 7LOADER_FLAGS = $(CFLAGS) $(LDFLAGS) 8LDLIBS = -ldl -lX11 -lXinerama 9 10all: winpl 11 12clean: 13 rm -f winpl winpl.so winpl.so.o 14 15winpl: loader.c winpl.so.o 16 $(CC) -o $@ $^ $(LOADER_FLAGS) 17 18winpl.so: winpl.c 19 $(CC) -o $@ $< $(LIB_FLAGS) $(LDLIBS) 20 21winpl.so.o: winpl.so 22 objcopy --input binary --output elf64-x86-64 \ 23 --binary-architecture i386:x86-64 $< $@ 24 25install: winpl 26 install -m755 winpl -t "$(DESTDIR)$(PREFIX)$(BINDIR)" 27 28uninstall: 29 rm -f "$(DESTDIR)$(PREFIX)$(BINDIR)/winpl" 30 31.PHONY: all clean install uninstall