aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-12-15 19:38:02 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-12-15 19:40:23 +1300
commit2e8a62385439a1e2bf12ec058812eef4fd5b2947 (patch)
tree2b2fc35990f7b78a9f17f61de43ca8bee5b1b39d
parentFirst commit wtf8(1), tiny UTF-8 inspector (diff)
downloadwtf8-2e8a62385439a1e2bf12ec058812eef4fd5b2947.tar.gz
wtf8-2e8a62385439a1e2bf12ec058812eef4fd5b2947.zip
Move includes into header file
-rw-r--r--Makefile3
-rw-r--r--wtf8.c3
-rw-r--r--wtf8.h2
3 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d72eba5..e260af6 100644
--- a/Makefile
+++ b/Makefile
@@ -5,5 +5,8 @@ CFLAGS = -std=c99 -Weverything -Wno-padded
all : wtf8
+wtf8 : wtf8.c wtf8.h
+ $(CC) $(CFLAGS) wtf8.c -o $@
+
clean :
rm -f wtf8
diff --git a/wtf8.c b/wtf8.c
index b073927..fd8bc78 100644
--- a/wtf8.c
+++ b/wtf8.c
@@ -1,5 +1,4 @@
-#include <stdio.h>
-#include <stdlib.h>
+#include "wtf8.h"
int main(int argc, char **argv) {
char *p;
diff --git a/wtf8.h b/wtf8.h
new file mode 100644
index 0000000..fbfff34
--- /dev/null
+++ b/wtf8.h
@@ -0,0 +1,2 @@
+#include <stdio.h>
+#include <stdlib.h>