Browse code

Allow customization of config.h via config.def.h

John Hawthorn authored on 07/11/2015 09:37:03
Showing 4 changed files

... ...
@@ -1,3 +1,4 @@
1 1
 fzy
2 2
 fzytest
3 3
 *.o
4
+config.h
... ...
@@ -25,6 +25,9 @@ fzy: fzy.o match.o tty.o choices.o
25 25
 %.o: %.c config.h
26 26
 	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
27 27
 
28
+config.h:
29
+	cp config.def.h config.h
30
+
28 31
 install: fzy
29 32
 	mkdir -p $(DESTDIR)$(BINDIR)
30 33
 	cp fzy $(DESTDIR)$(BINDIR)/
... ...
@@ -89,6 +89,7 @@ const char *choices_get(choices_t *c, size_t n) {
89 89
 		return NULL;
90 90
 	}
91 91
 }
92
+
92 93
 double choices_getscore(choices_t *c, size_t n) {
93 94
 	return c->results[n].score;
94 95
 }
95 96
similarity index 100%
96 97
rename from config.h
97 98
rename to config.def.h