summaryrefslogtreecommitdiffstats
path: root/gtk/module.rules
blob: 09a8c34c79f9653a6a1a55717c5e41289f026031 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
$(eval $(call import.MODULE.rules,GTK))

build: hgtk.build gtk.build
install: gtk.install
install-strip: gtk.install-strip
uninstall: gtk.uninstall
clean: hgtk.clean gtk.clean
xclean: gtk.xclean

gtk.configure: $(GTK.CONFIGURE.stamp)

$(GTK.CONFIGURE.stamp): | $(dir $(GTK.CONFIGURE.stamp))
$(GTK.CONFIGURE.stamp): $(GTK.src/)Makefile.am
$(GTK.CONFIGURE.stamp): $(GTK.src/)configure.ac $(GTK.src/)src/Makefile.am
	set -e; cd $(GTK.src/); NOCONFIGURE=1 ./autogen.sh
	set -e; cd $(GTK.build/); $(call fn.ABSOLUTE,$(GTK.src/))configure \
		$(GTK.CONFIGURE.extra) \
		PKG_CONFIG_PATH=$(BUILD/)contrib/lib/pkgconfig \
	    CFLAGS="$(call fn.ARGS,GTK.GCC,.g .O *D ?extra)" \
	    LDFLAGS="$(call fn.ARGS,GTK.GCC,?strip .g .O) " \
	    --prefix=$(PREFIX) \
	    --with-hb=$(call fn.ABSOLUTE,$(BUILD/))
	$(TOUCH.exe) $@

gtk.build: | $(GTK.build/)
gtk.build: $(GTK.CONFIGURE.stamp) $(LIBHB.a)
	+$(MAKE) -C $(GTK.build/)

gtk.install-strip:
	$(MAKE) -C $(GTK.build/) prefix=$(PREFIX) install-strip

gtk.install:
	$(MAKE) -C $(GTK.build/) prefix=$(PREFIX) install

gtk.uninstall:
	$(MAKE) -C $(GTK.build/) uninstall

gtk.clean: hgtk.clean
	$(MAKE) -C $(GTK.build/) clean

gtk.xclean: hgtk.clean
	$(MAKE) -C $(GTK.build/) distclean
	$(RM.exe) -f $(GTK.out)
	$(RM.exe) -fr $(GTK.build/)

###############################################################################
###############################################################################
$(eval $(call import.MODULE.rules,HGTK))
 
hgtk.build: $(CREATE_RES.exe)
 
$(CREATE_RES.exe): | $(dir $(CREATE_RES.exe))
$(CREATE_RES.exe): $(CREATE_RES.c.o) $(HGTKCOMMON.c.o)
	$(call HGTK.GCC.EXE,$@,$^)
 
$(HGTKCOMMON.c.o): | $(dir $(HGTKCOMMON.c.o))
$(HGTKCOMMON.c.o): $(BUILD/)%-native.o: $(SRC/)%.c
	$(call HGTK.GCC.C_O,$@,$<)
 
$(CREATE_RES.c.o): | $(dir $(CREATE_RES.c.o))
$(CREATE_RES.c.o): $(BUILD/)%-native.o: $(SRC/)%.c
	$(call HGTK.GCC.C_O,$@,$<)
 
hgtk.clean:
	$(RM.exe) -f $(HGTK.out)