1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
5 gb_WinResTarget_DEFAULTDEFS
:= $(gb_RCDEFS
)
7 define gb_WinResTarget_WinResTarget
8 $(call gb_WinResTarget_WinResTarget_init
,$(1))
9 $$(eval
$$(call gb_Module_register_target
,$(call gb_WinResTarget_get_target
,$(1)),$(call gb_WinResTarget_get_clean_target
,$(1))))
13 define gb_WinResTarget_WinResTarget_init
14 $(call gb_WinResTarget_get_target
,$(1)) : DEFS
:= $(gb_WinResTarget_DEFAULTDEFS
)
15 $(call gb_WinResTarget_get_target
,$(1)) : INCLUDE
:= $(SOLARINC
)
16 $(call gb_WinResTarget_get_clean_target
,$(1)) : RCFILE
:=
17 $(call gb_WinResTarget_get_target
,$(1)) : RCFILE
:=
19 ifeq ($(gb_FULLDEPS
),$(true
))
20 $(call gb_WinResTarget_get_dep_target
,$(1)) : DEFS
:= $$(gb_WinResTarget_DEFAULTDEFS
)
21 $(call gb_WinResTarget_get_dep_target
,$(1)) : INCLUDE
:= $$(gb_WinResTarget_INCLUDE
)
22 $(call gb_WinResTarget_get_dep_target
,$(1)) : RCFILE
:=
24 -include $(call gb_WinResTarget_get_dep_target
,$(1))
29 ifeq ($(gb_FULLDEPS
),$(true
))
30 $(call gb_WinResTarget_get_dep_target
,%) :
31 $(call gb_WinResTarget__command_dep
,$@
,$*,$<)
35 $(call gb_WinResTarget_get_target
,%) :
36 $(call gb_WinResTarget__command
,$@
,$*,$<)
38 $(call gb_WinResTarget_get_clean_target
,%) :
39 $(call gb_Output_announce
,$*,$(false
),RES
,3)
40 $(call gb_Helper_abbreviate_dirs
,\
41 rm -f
$(call gb_WinResTarget_get_target
,$*) \
42 $(call gb_WinResTarget_get_dep_target
,$*))
44 define gb_WinResTarget_set_defs
45 $$(call gb_Output_error
,gb_WinResTarget_set_defs
: use gb_WinResTarget_add_defs instead.
)
48 define gb_WinResTarget_add_defs
49 $(call gb_WinResTarget_get_target
,$(1)) : DEFS
+= $(2)
51 ifeq ($(gb_FULLDEPS
),$(true
))
52 $(call gb_WinResTarget_get_dep_target
,$(1)) : DEFS
+= $(2)
57 define gb_WinResTarget__add_include
58 $(call gb_WinResTarget_get_target
,$(1)) : INCLUDE
+= -I
$(2)
60 ifeq ($(gb_FULLDEPS
),$(true
))
61 $(call gb_WinResTarget_get_dep_target
,$(1)) : INCLUDE
+= -I
$(2)
66 define gb_WinResTarget_set_include
67 $(call gb_WinResTarget_get_target
,$(1)) : INCLUDE
:= $(2)
69 ifeq ($(gb_FULLDEPS
),$(true
))
70 $(call gb_WinResTarget_get_dep_target
,$(1)) : INCLUDE
:= $(2)
75 define gb_WinResTarget_add_file
76 $$(call gb_Output_error
,gb_WinResTarget_add_file
: use gb_WinResTarget_set_rcfile instead.
)
79 define gb_WinResTarget_set_rcfile
80 $(call gb_WinResTarget_get_clean_target
,$(1)) : RCFILE
:= $(SRCDIR
)/$(strip $(2)).rc
81 $(call gb_WinResTarget_get_target
,$(1)) : RCFILE
:= $(SRCDIR
)/$(strip $(2)).rc
82 $(call gb_WinResTarget_get_target
,$(1)) : $$(RCFILE
)
84 ifeq ($(gb_FULLDEPS
),$(true
))
85 $(call gb_WinResTarget_get_dep_target
,$(1)) : RCFILE
:= $(SRCDIR
)/$(strip $(2)).rc
90 define gb_WinResTarget_add_dependency
91 $(call gb_WinResTarget_get_target
,$(1)) : $(SRCDIR
)/$(strip $(2))
95 define gb_WinResTarget_add_dependencies
96 $(foreach dep
,$(2),$(call gb_WinResTarget_add_dependency
,$(1),$(dep
)))
100 define gb_WinResTarget__use_custom_headers
101 $(call gb_WinResTarget_get_target
,$(1)) : $(call gb_CustomTarget_get_target
,$(2))
102 $(call gb_WinResTarget__add_include
,$(1),$(call gb_CustomTarget_get_workdir
,$(2)))
106 define gb_WinResTarget_use_custom_headers
107 $(foreach customtarget
,$(2),$(call gb_WinResTarget__use_custom_headers
,$(1),$(customtarget
)))
111 # vim: set noet sw=4 ts=4: