aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..df0fad2
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+CFLAGS:=-Wall -O2
+
+view_cflags:=$(shell pkg-config --cflags glib-2.0 gio-unix-2.0 gdk-pixbuf-2.0)
+view_libs:=$(shell pkg-config --libs glib-2.0 gio-unix-2.0 gdk-pixbuf-2.0) -lm
+
+objs:=view.o
+
+all: view
+
+view: $(objs)
+ $(CC) $(LDFLAGS) -o $@ $+ $(view_libs)
+
+$(objs): %.o: %.c
+ $(CC) $(view_cflags) $(CFLAGS) -o $@ -c $<
+
+clean:
+ rm -f view *.o
+
+.PHONY: all clean