]> git.mdlowis.com Git - projs/tide.git/commitdiff
Tweaked makefile and test files to ensure the tests rebuild on updates to tested...
authorMike Lowis <mike.lowis@gentex.com>
Fri, 7 Oct 2016 17:00:12 +0000 (13:00 -0400)
committerMike Lowis <mike.lowis@gentex.com>
Fri, 7 Oct 2016 17:00:12 +0000 (13:00 -0400)
Makefile
tests/buf.c
tests/tests.c
tests/utf8.c

index b6d9998f185b83ca3f4c22b7f6721aeb12fd917f..396b07b45a8516b3c6335d52f7e81ba4ada320cb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,17 @@
 LDFLAGS  = -L/opt/X11/lib -lX11 -lXft
 CFLAGS   = --std=c99 -Wall -Wextra -I. -I/opt/X11/include -I/opt/local/include/freetype2 -I/usr/include/freetype2
-SRCS     = xedit.c buf.c screen.c utf8.c keyboard.c mouse.c
-OBJS     = $(SRCS:.c=.o)
-TESTSRCS = tests/tests.c tests/buf.c tests/utf8.c
-TESTOBJS = $(TESTSRCS:.c=.o)
+OBJS     = buf.o screen.o utf8.o keyboard.o mouse.o
+TESTOBJS = tests/tests.o tests/buf.o tests/utf8.o
 
 all: edit test
 
 test: unittests
        ./unittests
 
-edit: $(OBJS)
+edit: xedit.o $(OBJS)
        $(CC) -o $@ $^ $(LDFLAGS)
 
-unittests: $(TESTOBJS)
+unittests: $(TESTOBJS) $(OBJS)
        $(CC) -o $@ $^ $(LDFLAGS)
 
 clean:
index e9e449ccff28dd781e8ce3a3502e99971bf98c28..fac28c2ce933d14cab270afa58fbd6ca7cd60a31 100644 (file)
@@ -1,5 +1,5 @@
 #include "atf.h"
-#include "../buf.c"
+#include "edit.h"
 
 static Buf TestBuf;
 
index 051ab35e863f71c1e621d9ea01ab46138d3a917b..0f066e959edd0dbeb84ade6a986c28012751ae80 100644 (file)
@@ -1,5 +1,9 @@
 #define INCLUDE_DEFS
 #include "atf.h"
+#include "edit.h"
+
+Buf Buffer;
+unsigned CursorPos;
 
 int main(int argc, char** argv) {
     atf_init(argc,argv);
index 7f969e1442d88d1a17aced0ea4eb50f5461a6ae7..006954ea018f4cbcf25c922a6a0349ad27b29941 100644 (file)
@@ -1,5 +1,4 @@
 #include "atf.h"
-#include "../utf8.c"
 
 TEST_SUITE(Utf8Tests) {
 }