summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorDaniel Jones <admin@danieljon.es>2019-03-26 18:23:40 +1030
committerDaniel Jones <admin@danieljon.es>2019-03-26 18:23:40 +1030
commit5a1ff0323cf3a64358c65c01e69f3ecb9fac8ccd (patch)
tree29a0fdc64000a801b96d8e2a03b0749b84b73b15 /makefile
downloadxbell-5a1ff0323cf3a64358c65c01e69f3ecb9fac8ccd.tar.gz
xbell-5a1ff0323cf3a64358c65c01e69f3ecb9fac8ccd.zip
first code commit
Diffstat (limited to 'makefile')
-rw-r--r--makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..e259973
--- /dev/null
+++ b/makefile
@@ -0,0 +1,25 @@
+TARGET = xbell
+LIBS = -lX11
+CC = gcc
+CFLAGS = -g -Wall -Wextra -std=c99
+
+.PHONY: default all clean
+
+default: $(TARGET)
+all: default
+
+OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c))
+HEADERS = $(wildcard *.h)
+
+%.o: %.c $(HEADERS)
+ $(CC) $(CFLAGS) -c $< -o $@
+
+.PRECIOUS: $(TARGET) $(OBJECTS)
+
+$(TARGET): $(OBJECTS)
+ $(CC) $(OBJECTS) -Wall $(LIBS) -o $@
+
+clean:
+ -rm -f *.o
+ -rm -f $(TARGET)
+