diff --git a/Makefile b/Makefile index a9430a3..d35c950 100644 --- a/Makefile +++ b/Makefile @@ -17,9 +17,9 @@ fswatch := dep/lib/libfswatch.a DEPS += $(fswatch) OBJECTS += $(fswatch) $(fswatch): - cd dep && $(WGET) "https://github.com/emcrisostomo/fswatch/releases/download/1.14.0/fswatch-1.14.0.tar.gz" - cd dep && $(SHA256) fswatch-1.14.0.tar.gz 44d5707adc0e46d901ba95a5dc35c5cc282bd6f331fcf9dbf9fad4af0ed5b29d - cd dep && $(UNTAR) fswatch-1.14.0.tar.gz + cd $(WGET) "https://github.com/emcrisostomo/fswatch/releases/download/1.14.0/fswatch-1.14.0.tar.gz" + cd $(SHA256) fswatch-1.14.0.tar.gz 44d5707adc0e46d901ba95a5dc35c5cc282bd6f331fcf9dbf9fad4af0ed5b29d + cd dep && $(UNTAR) ../fswatch-1.14.0.tar.gz cd dep/fswatch-1.14.0 && $(CONFIGURE) --enable-shared=no cd dep/fswatch-1.14.0 && $(MAKE) cd dep/fswatch-1.14.0 && $(MAKE) install diff --git a/src/Prototype.cpp b/src/Prototype.cpp index 1d188ad..9d00ef6 100644 --- a/src/Prototype.cpp +++ b/src/Prototype.cpp @@ -147,8 +147,12 @@ struct Prototype : Module { // Watch file FSW_STATUS err = fsw_init_library(); if (err == FSW_OK) { -#ifdef ARCH_LIN +#if defined ARCH_LIN fsw_monitor_type type = inotify_monitor_type; +#elif defined ARCH_MAC + fsw_monitor_type type = fsevents_monitor_type; +#elif defined ARCH_WIN + fsw_monitor_type type = windows_monitor_type; #endif fsw = fsw_init_session(type); fsw_add_path(fsw, this->path.c_str());