For easy integration of libjodycode into your build process you can use this code stub to link against a built copy in ../libjodycode; modify as necessary. COMPILER_OPTIONS should be added to CFLAGS for each object. LINK_OPTIONS should be added to LDFLAGS for the final link. Add the static_jc and dynamic_jc rules to be able to build with libjodycode as a static inclusion or to link to it dynamically. Add the libjodycode_hint rule and add it to 'all' to tell the user about the static libjodycode make option. ----- cut here ----- ### Find and use nearby libjodycode by default ifndef IGNORE_NEARBY_JC ifneq ("$(wildcard ../libjodycode/libjodycode.h)","") $(info Found and using nearby libjodycode at ../libjodycode) COMPILER_OPTIONS += -I../libjodycode -L../libjodycode ifeq ("$(wildcard ../libjodycode/version.o)","") $(error You must build libjodycode before building winregfs) endif endif ifdef FORCE_JC_DLL LINK_OPTIONS += -l:../libjodycode/libjodycode.dll else LINK_OPTIONS += -ljodycode endif endif dynamic_jc: $(PROGRAM_NAME) $(CC) $(CFLAGS) $(OBJS) -Wl,-Bdynamic $(LDFLAGS) -o $(PROGRAM_NAME)$(SUFFIX) static_jc: $(PROGRAM_NAME) $(CC) $(CFLAGS) $(OBJS) -Wl,-Bstatic $(LDFLAGS) -Wl,-Bdynamic -o $(PROGRAM_NAME)$(SUFFIX) libjodycode_hint: $(info hint: if ../libjodycode is built but the program won't run, try doing 'make static_jc')