diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2015-05-19 16:14:49 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2015-05-26 18:01:39 +0100 |
commit | 9aae351487cc916e157a8e261f1bc3a7677dbfab (patch) | |
tree | c0d36d2f604393049f65b33cbd2f522089326538 /examples/application6 | |
parent | 9ff5d2e1accaed0babe54143a376f7f05704a2d9 (diff) | |
download | gtk+-9aae351487cc916e157a8e261f1bc3a7677dbfab.tar.gz |
examples: Clean up the standalone Makefiles
Do not hardcode GCC as the compiler; use $(shell) expansion instead of
backticks; split the built source into its own variable.
Diffstat (limited to 'examples/application6')
-rw-r--r-- | examples/application6/Makefile.example | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/examples/application6/Makefile.example b/examples/application6/Makefile.example index 418cc4d18b..eb9cff4c3c 100644 --- a/examples/application6/Makefile.example +++ b/examples/application6/Makefile.example @@ -1,13 +1,14 @@ -CC = gcc +CC ?= gcc PKGCONFIG = $(shell which pkg-config) -CFLAGS = `$(PKGCONFIG) --cflags gtk+-3.0` -LIBS = `$(PKGCONFIG) --libs gtk+-3.0` -GLIB_COMPILE_RESOURCES = `$(PKGCONFIG) --variable=glib_compile_resources gio-2.0` -GLIB_COMPILE_SCHEMAS = `$(PKGCONFIG) --variable=glib_compile_schemas gio-2.0` +CFLAGS = $(shell $(PKGCONFIG) --cflags gtk+-3.0) +LIBS = $(shell $(PKGCONFIG) --libs gtk+-3.0) +GLIB_COMPILE_RESOURCES = $(shell $(PKGCONFIG) --variable=glib_compile_resources gio-2.0) +GLIB_COMPILE_SCHEMAS = $(shell $(PKGCONFIG) --variable=glib_compile_schemas gio-2.0) -SRC = resources.c exampleapp.c exampleappwin.c exampleappprefs.c main.c +SRC = exampleapp.c exampleappwin.c exampleappprefs.c main.c +BUILT_SRC = resources.c -OBJS = $(SRC:.c=.o) +OBJS = $(BUILT_SRC:.c=.o) $(SRC:.c=.o) all: exampleapp @@ -29,6 +30,6 @@ exampleapp: $(OBJS) gschemas.compiled clean: rm -f org.gtk.exampleapp.gschema.valid rm -f gschemas.compiled - rm -f resources.c + rm -f $(BUILT_SRC) rm -f $(OBJS) rm -f exampleapp |