about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUjjwal Verma <ujjwalverma1111@gmail.com>2017-08-31 04:34:00 +0530
committerUjjwal Verma <ujjwalverma1111@gmail.com>2017-08-31 04:34:00 +0530
commit897a9b0a15e5d92b1aca5efd4ba843875722a4fb (patch)
tree71454969ae11bf507c4858334ef467cdb05bd9b7
parentFirst Commit (diff)
downloadxwinwrap-897a9b0a15e5d92b1aca5efd4ba843875722a4fb.tar.gz
xwinwrap-897a9b0a15e5d92b1aca5efd4ba843875722a4fb.tar.bz2
xwinwrap-897a9b0a15e5d92b1aca5efd4ba843875722a4fb.zip
Added Makefile
-rw-r--r--Makefile16
-rw-r--r--README.md16
2 files changed, 26 insertions, 6 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..ac6981a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,16 @@
+CC = gcc
+CFLAGS= -g -Wall
+INCLUDE = -L /usr/lib/x86_64-linux-gnu
+LIBS = -lX11 -lXext -lXrender
+
+all:
+	${CC} xwinwrap.c ${CFLAGS} ${INCLUDE} ${LIBS} -o xwinwrap
+
+install:
+	install xwinwrap '/usr/local/bin'
+
+uninstall:
+	rm -f '/usr/local/bin/xwinwrap'
+
+clean:
+	rm -f xwinwrap
diff --git a/README.md b/README.md
index aaa0498..bb2d341 100644
--- a/README.md
+++ b/README.md
@@ -4,12 +4,16 @@ My fork of xwinwrap.
 Xwinwrap allows you to stick most of the apps to your desktop background.  
 My use case - can use gif as a background
 
-### Compiling
+### Installing
 
-`gcc -Wall xwinwrap.c -lX11 -lXext -lXrender -g -o xwinwrap`
-
-You may have to use `-L` flag to specify directory for xlib.
-e.g. `gcc -Wall xwinwrap.c -L /usr/lib/x86_64-linux-gnu -lX11 -lXext -lXrender -g -o xwinwrap`
+```
+sudo apt-get install xorg-dev build-essential libx11-dev x11proto-xext-dev libxrender-dev libxext-dev
+git clone https://github.com/ujjwal96/xwinwrap.git
+cd xwinwrap
+make
+sudo make install
+make clean
+```
 
 ### Usage
 
@@ -33,7 +37,7 @@ Options:
              -debug  - Enable debug messages
 ```
 Example
-`./xwinwrap -g 400x400 -ni -s -nf -b -un -argb -sh circle -- gifview -w WID mygif.gif -a`
+`xwinwrap -g 400x400 -ni -s -nf -b -un -argb -sh circle -- gifview -w WID mygif.gif -a`
 
 ### Changes