summaryrefslogtreecommitdiffstats
path: root/win/targets.vc
blob: a345b4f7dcfe843d31ca80902ccfe8fd9495717d (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
#------------------------------------------------------------- -*- makefile -*-
# targets.vc --
#
# Part of the nmake based build system for Tcl and its extensions.
# This file defines some standard targets for the convenience of extensions
# and can be optionally included by the extension makefile.
# See TIP 477 (https://core.tcl.tk/tips/doc/trunk/tip/477.md) for docs.

$(PROJECT): setup pkgindex $(PRJLIB)

!ifdef PRJ_STUBOBJS
$(PROJECT): $(PRJSTUBLIB)
$(PRJSTUBLIB): $(PRJ_STUBOBJS)
	$(LIBCMD) $**

$(PRJ_STUBOBJS):
	$(CCSTUBSCMD) %s
!endif # PRJ_STUBOBJS

!ifdef PRJ_MANIFEST
$(PROJECT): $(PRJLIB).manifest
$(PRJLIB).manifest: $(PRJ_MANIFEST)
	@nmakehlp -s << $** >$@
@MACHINE@	  $(MACHINE:IX86=X86)
<<
!endif

!if "$(PROJECT)" != "tcl" && "$(PROJECT)" != "tk"
# MAKEBINCMD will do shared, static and debug links as appropriate
# _VC_MANIFEST_EMBED_DLL embeds the manifest for shared libraries
# and is a no-op for static libraries
$(PRJLIB): $(PRJ_OBJS) $(RESFILE)
!if $(STATIC_BUILD)
       $(LIBCMD) $**
!else
       $(DLLCMD) $**
!endif
       $(_VC_MANIFEST_EMBED_DLL)
       -@del $*.exp
!endif

!ifndef DISABLE_STANDARD_TARGETS
DISABLE_STANDARD_TARGETS = 0
!endif

!if !$(DISABLE_STANDARD_TARGETS)
setup: default-setup
install: default-install
clean: default-clean
realclean: hose
hose: default-hose
distclean: realclean default-distclean
test: default-test
shell: default-shell
!endif