all: $(BIN)
-$(BIN): $(OBJ)
+$(BIN): config.h $(OBJ)
$(CC) -o $@ $(OBJ) $(LDLIBS)
-noice.o: noice.c queue.h util.h
+config.h:
+ @echo copying config.def.h to $@
+ @cp config.def.h $@
+
+noice.o: noice.c util.h
$(CC) -c noice.c
strlcpy.o: strlcpy.c util.h
--- /dev/null
+/* Configuration */
+struct assoc assocs[] = {
+ { "\\.(avi|mp4|mkv|mp3|ogg)$", "mplayer" },
+ { "\\.(png|jpg|gif)$", "feh" },
+ { "\\.(html|svg)$", "firefox" },
+ { "\\.pdf$", "mupdf" },
+ { "\\.sh$", "sh" },
+ { ".*", "less" },
+};
char *bin; /* Program */
};
-/* Configuration */
-struct assoc assocs[] = {
- { "\\.(avi|mp4|mkv|mp3|ogg)$", "mplayer" },
- { "\\.(png|jpg|gif)$", "feh" },
- { "\\.(html|svg)$", "firefox" },
- { "\\.pdf$", "mupdf" },
- { "\\.sh$", "sh" },
- { ".*", "less" },
-};
+#include "config.h"
struct entry {
char *name;