summaryrefslogtreecommitdiffstats
path: root/private/lsa/makefil0
blob: 227e60420b0b8a3d67cdbe0a1e457a24997caf6a (plain) (blame)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#
# This is the MIDL compile phase of the build process.
#
# The following is where you put the name of your .idl file without
# the .idl extension:

!INCLUDE $(NTMAKEENV)\makefile.plt

IDL_NAME = lsarpc
CLIENT_ACF = lsacli.acf
SERVER_ACF = lsasrv.acf

CLIENT_INC_FILE = $(IDL_NAME)_c.h
SERVER_INC_FILE = $(IDL_NAME).h

SDKINC = $(BASEDIR)\public\sdk\inc
SDKCRTINC = $(BASEDIR)\public\sdk\inc\crt
PRIVINC = ..\inc
LSAINC = .\inc

INCS  = -I$(SDKINC)  -I$(SDKCRTINC) -I$(PRIVINC) -I$(LSAINC)

EXTRN_DEPENDS = $(SDKINC)\ntlsa.h

CLIENT_FLAGS = -Oi -oldnames -error allocation -error ref -c_ext -ms_ext $(MIDL_FLAGS) -acf $(CLIENT_ACF) -header $(CLIENT_INC_FILE) 
SERVER_FLAGS = -oldnames -error allocation -error ref -c_ext -ms_ext $(MIDL_FLAGS) -acf $(SERVER_ACF) -header $(SERVER_INC_FILE)

CPP = -cpp_cmd "$(MIDL_CPP)" 

#
# Separate client and server targets.  Note that the .h file produced
# when MIDL is run with the client .acf file attached differs from the
# .h file produced when MIDL is run with the server .acf file attached.
#

CLIENT_TARGETS = uclient\$(IDL_NAME)_c.c  \
                 uclient\$(CLIENT_INC_FILE)

SERVER_TARGETS = server\$(IDL_NAME)_s.c  \
                 $(PRIVINC)\$(SERVER_INC_FILE)

TARGETS =   $(CLIENT_TARGETS) \
            $(SERVER_TARGETS)

CLIENT_EXTRN_DEPENDS = $(CLIENT_ACF)
SERVER_EXTRN_DEPENDS = $(SERVER_ACF)
EXTRN_DEPENDS = $(CLIENT_EXTRN_DEPENDS)
#EXTRN_DEPENDS = $(CLIENT_EXTRN_DEPENDS) $(SERVER_EXTRN_DEPENDS)

#
# Define Products and Dependencies
#

all:    $(CLIENT_TARGETS) $(SERVER_TARGETS) $(EXTRN_DEPENDS)
!IF "$(BUILDMSG)" != ""
    @ech ; $(BUILDMSG) ;
!ENDIF

clean: delete_source all

delete_source:
    -erase $(TARGETS)

#
# MIDL COMPILE
#

$(CLIENT_TARGETS) : $(IDL_NAME).idl $(CLIENT_EXTRN_DEPENDS)
    IF EXIST inc\$(IDL_NAME).h del inc\$(IDL_NAME).h
    copy $(PRIVINC)\lsaimp.h .
    midl $(CPP) $(CLIENT_FLAGS) $(IDL_NAME).idl $(INCS)
    del lsaimp.h
    IF EXIST $(IDL_NAME)_c.c copy $(IDL_NAME)_c.c .\uclient & del  $(IDL_NAME)_c.c
    IF EXIST $(IDL_NAME)_s.c del  $(IDL_NAME)_s.c
    IF EXIST $(CLIENT_INC_FILE)   copy $(CLIENT_INC_FILE)   .\uclient & del  $(CLIENT_INC_FILE)

#$(SERVER_TARGETS) : $(IDL_NAME).idl $(SERVER_EXTRN_DEPENDS)
$(SERVER_TARGETS) : $(IDL_NAME).idl
    IF EXIST inc\$(IDL_NAME).h del inc\$(IDL_NAME).h
    copy $(PRIVINC)\lsaimp.h
    midl $(CPP) $(SERVER_FLAGS) $(IDL_NAME).idl $(INCS)
    del lsaimp.h
    IF EXIST $(IDL_NAME)_c.c del  $(IDL_NAME)_c.c
    IF EXIST $(IDL_NAME)_s.c copy $(IDL_NAME)_s.c .\server & del  $(IDL_NAME)_s.c
    IF EXIST $(SERVER_INC_FILE)   copy $(SERVER_INC_FILE)   $(PRIVINC) & del  $(SERVER_INC_FILE)