79 lines
2.7 KiB
Plaintext
79 lines
2.7 KiB
Plaintext
#
|
|
# This is the MIDL compile phase of the build process.
|
|
#
|
|
# The following symbols should be defined in your environment:
|
|
# NOTE: This file is designed to provide separate generation
|
|
# of client and server stubs. Right now, it uses an
|
|
# .acf for only the client stub generation. However,
|
|
# lines to cause a server .acf file to be used are present
|
|
# but commented out.
|
|
# The following is where you put the name of your .idl file without
|
|
# the .idl extension:
|
|
|
|
!INCLUDE $(NTMAKEENV)\makefile.plt
|
|
|
|
IDL_NAME = samrpc
|
|
CLIENT_ACF = samcli.acf
|
|
SERVER_ACF = samsrv.acf
|
|
|
|
CLIENT_INC_FILE = samrpc_c.h
|
|
SERVER_INC_FILE = samrpc.h
|
|
|
|
SDKINC = $(BASEDIR)\public\sdk\inc
|
|
SDKCRTINC = $(BASEDIR)\public\sdk\inc\crt
|
|
PRIVATEINC = ..\inc
|
|
|
|
CLIENT_FLAGS = -acf $(CLIENT_ACF) -header $(CLIENT_INC_FILE)
|
|
SERVER_FLAGS = -acf $(SERVER_ACF) -header $(SERVER_INC_FILE)
|
|
INCS = -I$(SDKINC) -I$(SDKCRTINC) -I$(PRIVATEINC)
|
|
|
|
CLIENT_CPP = -cpp_cmd "$(MIDL_CPP)" $(MIDL_FLAGS)
|
|
SERVER_CPP = -cpp_cmd "$(MIDL_CPP)" $(MIDL_FLAGS)
|
|
|
|
# seperate client and server targets. The .h file is built by both.
|
|
|
|
CLIENT_TARGETS = client\$(IDL_NAME)_c.c \
|
|
.\client\$(CLIENT_INC_FILE)
|
|
|
|
SERVER_TARGETS = server\$(IDL_NAME)_s.c \
|
|
$(PRIVATEINC)\$(SERVER_INC_FILE)
|
|
|
|
TARGETS = $(CLIENT_TARGETS) \
|
|
$(SERVER_TARGETS)
|
|
|
|
CLIENT_EXTRN_DEPENDS = $(CLIENT_ACF)
|
|
EXTRN_DEPENDS = $(CLIENT_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)
|
|
copy $(PRIVATEINC)\samimp.h .
|
|
midl -Oi -oldnames -error allocation -error ref -ms_ext -c_ext $(CLIENT_CPP) $(CLIENT_FLAGS) $(IDL_NAME).idl $(INCS)
|
|
IF EXIST $(IDL_NAME)_c.c copy $(IDL_NAME)_c.c .\client & 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) .\client & 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
|
|
IF EXIST .\server\$(IDL_NAME).h del .\server\$(IDL_NAME).h
|
|
copy $(PRIVATEINC)\samimp.h .
|
|
midl -oldnames -error allocation -error ref -ms_ext -c_ext $(SERVER_CPP) $(SERVER_FLAGS) $(IDL_NAME).idl $(INCS)
|
|
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) $(PRIVATEINC) & del $(SERVER_INC_FILE)
|