From 2ee2749de7c8e6ea98d091255dd824a33a1ece73 Mon Sep 17 00:00:00 2001 From: Lakindu Akash Date: Thu, 8 Oct 2020 17:24:29 +0530 Subject: [PATCH] Fix AUR pkgbuild --- src/Makefile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/Makefile b/src/Makefile index a14acae..cf71c05 100644 --- a/src/Makefile +++ b/src/Makefile @@ -20,19 +20,26 @@ BUILT_SRC = resources.c _OBJ = main.o ui.o h_prop.o util.o read_config.o $(BUILT_SRC:.c=.o) OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ)) -all: resources.c $(ODIR)/wihotspot-gui +# Determine this makefile's path. +# Be sure to place this BEFORE `include` directives, if any. +THIS_FILE := $(lastword $(MAKEFILE_LIST)) + +.PHONY: clean + +all: resources.c resources.c: ui/glade/wifih.gresource.xml ui/glade/wifih.ui $(GLIB_COMPILE_RESOURCES) ui/glade/wifih.gresource.xml --target=ui/$@ --sourcedir=ui/glade --generate-source - + @$(MAKE) -f $(THIS_FILE) wihotspot-gui + $(ODIR)/%.o: ui/%.c $(CC) -c -o $@ $< $(CFLAGS) $(ODIR)/%.o: ui/%.cpp g++ -c -o $@ $< -$(ODIR)/wihotspot-gui: $(OBJ) - $(CC) -o $@ $^ $(CFLAGS) $(LIBS) +wihotspot-gui: $(OBJ) + $(CC) -o $(ODIR)/$@ $^ $(CFLAGS) $(LIBS) install: $(ODIR)/wihotspot-gui mkdir -p $(DESTDIR)$(APP_DIR) @@ -54,8 +61,6 @@ clean-old: rm -f $(DESTDIR)/usr/bin/wihotspot_gui rm -f $(DESTDIR)/usr/bin/wihotspot -.PHONY: clean - clean: rm -f $(ODIR)/*.o rm -f ui/$(BUILT_SRC)