diff --git a/axevent/subscribe_to_events/app/Makefile b/axevent/subscribe_to_events/app/Makefile index 85ede729..af459217 100644 --- a/axevent/subscribe_to_events/app/Makefile +++ b/axevent/subscribe_to_events/app/Makefile @@ -1,4 +1,8 @@ -PROG = $(shell jq -r '.acapPackageConf.setup.appName' manifest.json) +PROG1 = $(shell jq -r '.acapPackageConf.setup.appName' manifest.json) +OBJS1 = $(PROG1).c + +PROGS = $(PROG1) +DEBUG_DIR = debug PKGS = glib-2.0 axevent CFLAGS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags $(PKGS)) @@ -17,7 +21,13 @@ CFLAGS += -Wall \ -W \ -Werror -all: $(PROG) +all: $(PROGS) + +$(PROG1): $(OBJS1) + install -d $(DEBUG_DIR) + $(CC) $^ $(CFLAGS) $(LIBS) $(LDFLAGS) -lm $(LDLIBS) -o $(DEBUG_DIR)/$@ + cp $(DEBUG_DIR)/$@ . + $(STRIP) $@ clean: - rm -f $(PROG) *.o *.eap* *_LICENSE.txt package.conf* param.conf tmp* + rm -f $(PROGS) *.o *.eap* *_LICENSE.txt package.conf* param.conf tmp* $(DEBUG_DIR)