summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorDaniel Jones <admin@danieljon.es>2019-04-17 12:00:29 +0930
committerDaniel Jones <admin@danieljon.es>2019-04-17 12:00:29 +0930
commit667bf7127e0da7160c3eea03151e37590caa1332 (patch)
treedde95587a907fd54cda1862a6955c9ea68ea645f /makefile
downloadxwake-667bf7127e0da7160c3eea03151e37590caa1332.tar.gz
xwake-667bf7127e0da7160c3eea03151e37590caa1332.zip
first commit
Diffstat (limited to 'makefile')
-rw-r--r--makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..f94e976
--- /dev/null
+++ b/makefile
@@ -0,0 +1,24 @@
+TARGET = xwake
+LIBS = -lX11 -lXss
+CC = gcc
+CFLAGS = -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)
+