Browse code

Move sources into src directory

John Hawthorn authored on 21/05/2016 21:56:03
Showing 10 changed files

... ...
@@ -11,8 +11,8 @@ INSTALL=install
11 11
 INSTALL_PROGRAM=$(INSTALL)
12 12
 INSTALL_DATA=${INSTALL} -m 644
13 13
 
14
-OBJECTS=fzy.o match.o tty.o choices.o
15
-TESTOBJECTS=fzytest.o match.o choices.o
14
+OBJECTS=src/fzy.o src/match.o src/tty.o src/choices.o
15
+TESTOBJECTS=src/fzytest.o src/match.o src/choices.o
16 16
 
17 17
 all: fzy
18 18
 
... ...
@@ -30,7 +30,7 @@ fzy: $(OBJECTS)
30 30
 	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
31 31
 
32 32
 config.h:
33
-	cp config.def.h config.h
33
+	cp src/config.def.h config.h
34 34
 
35 35
 install: fzy
36 36
 	mkdir -p $(DESTDIR)$(BINDIR)
... ...
@@ -41,9 +41,9 @@ install: fzy
41 41
 	chmod 644 ${DESTDIR}${MANDIR}/man1/fzy.1
42 42
 
43 43
 fmt:
44
-	clang-format -i *.c *.h
44
+	clang-format -i src/*.c src/*.h
45 45
 
46 46
 clean:
47
-	rm -f fzy fzytest *.o
47
+	rm -f fzy fzytest src/*.o
48 48
 
49 49
 .PHONY: test check all clean install fmt
50 50
similarity index 100%
51 51
rename from choices.c
52 52
rename to src/choices.c
53 53
similarity index 100%
54 54
rename from choices.h
55 55
rename to src/choices.h
56 56
similarity index 100%
57 57
rename from config.def.h
58 58
rename to src/config.def.h
59 59
similarity index 99%
60 60
rename from fzy.c
61 61
rename to src/fzy.c
... ...
@@ -9,7 +9,7 @@
9 9
 #include "tty.h"
10 10
 #include "choices.h"
11 11
 
12
-#include "config.h"
12
+#include "../config.h"
13 13
 
14 14
 static int flag_show_scores = 0;
15 15
 
16 16
similarity index 100%
17 17
rename from fzytest.c
18 18
rename to src/fzytest.c
19 19
similarity index 99%
20 20
rename from match.c
21 21
rename to src/match.c
... ...
@@ -7,7 +7,7 @@
7 7
 
8 8
 #include "match.h"
9 9
 
10
-#include "config.h"
10
+#include "../config.h"
11 11
 
12 12
 char *strcasechr(const char *s, char c) {
13 13
 	const char accept[3] = {c, toupper(c), 0};
14 14
similarity index 100%
15 15
rename from match.h
16 16
rename to src/match.h
17 17
similarity index 100%
18 18
rename from tty.c
19 19
rename to src/tty.c
20 20
similarity index 100%
21 21
rename from tty.h
22 22
rename to src/tty.h