summaryrefslogtreecommitdiff
path: root/include/makeinclude/build_dll.bor
blob: 1429ca8c2b1210129a3670f49c2a6f8a25a1448f (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
#
# Rules for linking a dll
# 
# Inputs:
# ~~~~~~~
# NAME - undecorated name of target
# CFLAGS - extra compiler flags for building target
# CPPDIR - list of directories containing source files
# OBJFILES - list of (non-system) object files
# LIBFILES - list of (non-system) libraries
# PASCAL - if defined means link dll against pascal run-time library
# DEBUG - if defined means building with debug information
#

!include <$(ACE_ROOT)\include\makeinclude\decorator.bor>
!include <$(ACE_ROOT)\include\makeinclude\outputdir.bor>
!include <$(ACE_ROOT)\include\makeinclude\compiler.bor>

TARGET = $(BINDIR)\$(NAME)$(LIB_DECORATOR).dll

$(TARGET): $(OBJFILES) $(RESOURCE)
	@$(MAKE_BINDIR)
	$(LD) @&&!
	$(COMMON_LFLAGS) $(DLL_LFLAGS) $(LFLAGS) +
	$(DLL_STARTUP_OBJ) $(OBJFILES), +
	$(TARGET),, +
	$(COMMON_LIBS) $(LIBFILES),, +
	$(RESOURCE)
!
!ifndef DEBUG
	@del $(TARGET:.dll=.tds)
!endif

clean:
	@copy &&!
@del $(OBJFILES:.obj=.obj ^
@del ) $(RESOURCE)
! clean_$(NAME)~.bat 1> NUL
	-@clean_$(NAME)~.bat 2> NUL
	@del clean_$(NAME)~.bat

!ifdef CPPDIR
.path.cpp = $(CPPDIR)
!endif

!ifdef RESDIR
.path.rc = $(RESDIR)
!else
.path.rc = .
!endif

.path.obj = $(OBJDIR)

.cpp.obj:
	@$(MAKE_OBJDIR)
	$(CC) $(COMMON_CFLAGS) $(DLL_CFLAGS) $(CFLAGS) -c -n$(@D) $<

.rc.res:
	@$(MAKE_OBJDIR)
	$(RC) -fo$@ $<

.autodepend