summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jones <admin@danieljon.es>2019-12-08 22:53:47 +1030
committerDaniel Jones <admin@danieljon.es>2019-12-08 22:54:16 +1030
commit3a8f8c7318d7a664684ceb5b7b2c2c9ed0b82087 (patch)
tree8ccaecfc31f6466b302522a8c08b1422d6cba96f
parentd4895beb08fff1f173c58bbebe1be2e1b4c3a9ff (diff)
downloadbinstatus-3a8f8c7318d7a664684ceb5b7b2c2c9ed0b82087.tar.gz
binstatus-3a8f8c7318d7a664684ceb5b7b2c2c9ed0b82087.zip
add generic make file
-rw-r--r--makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..8005ab8
--- /dev/null
+++ b/makefile
@@ -0,0 +1,25 @@
+TARGET = binstatus
+LIBS = -lX11
+CC = gcc
+CFLAGS = -g -Wall -Werror
+
+.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)
+