1INSTALL = /usr/bin/install -m 755 2PREFIX = /usr/local 3CC = cc 4ARCH = `uname -p` 5 6TARGET = xwinwrap 7 8CFLAGS = -I${LOCALBASE}/include -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls 9LDFLAGS = -L${LOCALBASE}/lib -lX11 -lXext -lXrender 10 11all: 12 if [ "${ARCH}" = "x86_64" ] ; then \ 13 $(CC) $(CFLAGS) $(LDFLAGS) $(TARGET).c -o $(TARGET); \ 14 elif [ "${ARCH}" = "i386" ] ; then \ 15 $(CC) -m32 $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) $(TARGET).c -o $(TARGET); \ 16 else \ 17 echo 'ERROR: UNKNOWN ARCH'; \ 18 fi; 19 20install: 21 $(INSTALL) $(TARGET) $(DESTDIR)$(PREFIX)/bin 22clean: 23 -rm $(TARGET) 24