Update Makefile

This commit is contained in:
Lakindu Akash 2020-10-09 02:31:27 +05:30
parent 2ee2749de7
commit 179a84b925
No known key found for this signature in database
GPG Key ID: 87D9889F7A634A38

View File

@ -17,6 +17,8 @@ GLIB_COMPILE_RESOURCES = $(shell $(PKGCONFIG) --variable=glib_compile_resources
BUILT_SRC = resources.c
HEADER_FILES = ui/ui.h ui/read_config.h ui/util.h ui/h_prop.h
_OBJ = main.o ui.o h_prop.o util.o read_config.o $(BUILT_SRC:.c=.o)
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
@ -24,10 +26,13 @@ OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
# Be sure to place this BEFORE `include` directives, if any.
THIS_FILE := $(lastword $(MAKEFILE_LIST))
.PHONY: clean
.PHONY: clean resources.c
all: resources.c
generate-resources: ui/glade/wifih.gresource.xml ui/glade/wifih.ui
$(GLIB_COMPILE_RESOURCES) ui/glade/wifih.gresource.xml --target=ui/resources.c --sourcedir=ui/glade --generate-source
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