86 lines
2.6 KiB
Plaintext
86 lines
2.6 KiB
Plaintext
#
|
|
# 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)
|