From e54d8327819e310b7b148e45c15fca197be845c7 Mon Sep 17 00:00:00 2001 From: nirav Date: Sun, 9 Sep 2018 12:13:13 +0530 Subject: Moved source files to src dir, updated makefile --- Makefile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3230804 --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +CC?=cc +INSTALL?=install + +CFLAGS?=-o2 -pipe -Wall -std=c11 $(shell pkg-config --cflags gtk+-3.0) +LDFLAGS?=$(shell pkg-config --libs gtk+-3.0) +PREFIX?=/usr/local +BINDIR?=$(PREFIX)/bin + +SRCDIR=src +OUTDIR=build +OBJECTS=\ + $(OUTDIR)/main.o \ + $(OUTDIR)/file.o \ + $(OUTDIR)/image.o \ + $(OUTDIR)/input.o \ + $(OUTDIR)/window.o \ + +all: qwe + +qwe: $(OBJECTS) + $(CC) -o qwe $(OBJECTS) $(LDFLAGS) + +$(OUTDIR)/%.o: $(SRCDIR)/%.c + @mkdir -p $(OUTDIR) + $(CC) -c $(CFLAGS) -o $@ $< + +clean: + rm -rf $(OUTDIR) qwe + +install: qwe + $(INSTALL) -m0755 qwe $(BINDIR) + +uninstall: + rm -rf $(BINDIR)/qwe + +.PHONY: all clean install uninstall -- cgit v1.2.3