CFLAGS += -DHAVE_LUA
endif
+ifeq ($(UBUS_SUPPORT),1)
+ CFLAGS += -DHAVE_UBUS
+endif
+
world: compile
-o $(TLSLIB) uhttpd-tls.c
endif
+ifeq ($(UBUS_SUPPORT),1)
+ UBUSLIB := uhttpd_ubus.so
+
+ $(UBUSLIB): uhttpd-ubus.c
+ $(CC) $(CFLAGS) $(LDFLAGS) $(FPIC) \
+ -shared -lubus -ljson -lblobmsg_json \
+ -o $(UBUSLIB) uhttpd-ubus.c
+endif
+
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
-compile: $(OBJ) $(TLSLIB) $(LUALIB)
+compile: $(OBJ) $(TLSLIB) $(LUALIB) $(UBUSLIB)
$(CC) -o uhttpd $(LDFLAGS) $(OBJ) $(LIB)
clean: