aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2019-02-02 11:38:07 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2019-02-02 11:38:07 +0100
commit5350231043573aba15902b5d71135188728fa047 (patch)
treee79e47ccf48c38cd0026643f9903bd31fb43d276 /Makefile
downloadAsciiMap-5350231043573aba15902b5d71135188728fa047.tar.gz
Initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
1 files changed, 32 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..fbc777a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,32 @@
+CC = /usr/bin/gcc
+CFLAGS = -Wall -g
+LDFLAGS =
+OUTPUT = bitmap
+BUILDDIR = build
+
+OBJ = main.o
+
+build: $(OBJ)
+ mkdir -p $(BUILDDIR)
+ $(CC) $(CFLAGS) -o $(BUILDDIR)/$(OUTPUT) $(OBJ) $(LDFLAGS)
+
+debug: build
+ gdb $(BUILDDIR)/$(OUTPUT) a.bmp
+
+%.o: %.c
+ @echo
+ @echo Building $<
+ @echo ==============
+ @echo
+ $(CC) $(CFLAGS) -c $<
+
+all: clean build
+
+.PHONY: clean
+
+clean:
+ rm -df $(OBJ)
+ rm -Rdf $(BUILDDIR)
+
+run: build
+ @LD_LIBRARY_PATH=../lib/ $(BUILDDIR)/$(OUTPUT) a.bmp