aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLuke Rewega <lrewega@c32.ca>2015-02-13 14:40:50 -0500
committerLuke Rewega <lrewega@c32.ca>2015-02-13 14:42:01 -0500
commit75752f3c8d91d7ac52020a8c5fd325492d56c624 (patch)
treecebded799f2b25bb0fe0fa9b401359fbf28bdda7 /Makefile
parentaf2b1030083eced0c606d64a8e84db90e87399c1 (diff)
Modernize Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 14 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index f5d3b31..363b994 100644
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,21 @@
-all: all64 all32
+CFLAGS = -g -O2 -Wall -Wextra
+LDFLAGS =
+LDLIBS = -lX11 -lXext -lXrender
-all64:
- gcc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -lX11 -lXext -lXrender xwinwrap.c -o xwinwrap
- -mkdir x86_64
- mv ./xwinwrap ./x86_64
+prefix = /usr/local
+bindir = $(prefix)/bin
-all32:
- gcc -m32 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -lX11 -lXext -lXrender xwinwrap.c -o xwinwrap
- -mkdir i386
- mv ./xwinwrap ./i386
+CC = cc
+RM = rm -f
+INSTALL = install
-install64:
- cp x86_64/xwinwrap /usr/bin
+all: xwinwrap
-install32:
- cp i386/xwinwrap /usr/bin
+install: xwinwrap
+ $(INSTALL) -d -m 755 '$(DESTDIR)$(bindir)'
+ $(INSTALL) xwinwrap '$(DESTDIR)$(bindir)'
clean:
- -rm -rf x86_64/ i386/
-
+ $(RM) xwinwrap
+.PHONY: all install clean