OpenTP1 Version 7 User's Guide
This subsection explains UAP creation in C language.
You need a manifest file in order to run a program created in Visual Studio. Either embed the manifest file in the program or copy the manifest file to the folder where the executable file is located.
Because TP1/Server Base has been created by Visual Studio, you must install C runtime libraries to run TP1/Server Base.
For details about the C runtime libraries that must be installed, see the Release Notes.
This subsection shows an example of a makefile needed for creating an SPP.
The following shows the names of the source files that are used in the example of a makefile.
The following shows an example of a makefile:
NODEBUG = 1 !include <ntwin32.mak> # TP1TEST Make File SYSLIB = $(conlibsdll) TP1LIB = [libdam.lib]#1 [libtam.lib]#2 libbetran.lib all:TP1TEST.exe # Compile exmain.obj:exmain.c $(cc) $(cflags) $(cvarsdll) $*.c exsv1.obj:exsv1.c $(cc) $(cflags) $(cvarsdll) $*.c exsv2.obj:exsv2.c $(cc) $(cflags) $(cvarsdll) $*.c ex_sstb.obj:ex_sstb.c $(cc) $(cflags) $(cvarsdll) $*.c # Create a stub source file ex_sstb.c:ex.def $(DCDIR)\bin\stbmake $? # Link TP1TEST.exe: exmain.obj exsv1.obj exsv2.obj ex_sstb.obj $(link) $(conflags) -out:$*.exe $** \ [$(DCDIR)\spool\trnrmcmd\userobj\dctrninf.obj \]#3 $(TP1LIB) $(SYSLIB) [mt -manifest $@.manifest -outputresource:$@;1]#4 |
This subsection shows an example of a makefile needed for creating an MHP.
NODEBUG = 1 !include <ntwin32.mak> # makefile for making UAP(C Language) # command STBMAKE = $(DCDIR)\bin\stbmake.exe # stub name STBMAKE_MHP_SRC = mhp_sstb # user server object MHP_SRC = mhpmain.obj mhp_sv.obj # include file INCDIR = -I. \ -I $(DCDIR)\include # common object SH_OBJ = $(DCDIR)\spool\trnrmcmd\userobj\mcf_sw.obj # common library LIBNAME = $(DCDIR)\lib\libmcf.lib \ $(DCDIR)\lib\libmnet.lib \ $(DCDIR)\lib\libbetran.lib # compiler options CC = $(cc) CCOPT = -nologo $(cflags) $(cvarsdll) CONFIG = -c CFLAGS = $(CCOPT) $(CONFIG) $(INCDIR) # linker options LK = $(link) LNKFLG = $(conflags) /NODEFAULTLIB LINKAGE = $(conlibsdll) $(LIBNAME) msvcrt.lib .c.obj: $(CC) $*.c $(CFLAGS) all : $(SH_OBJ) tcpmhp.exe $(STBMAKE_MHP_SRC).c : $(STBMAKE) -s $(STBMAKE_MHP_SRC).c $(STBMAKE_MHP_SRC).def tcpmhp.exe : $(STBMAKE_MHP_SRC).obj $(MHP_SRC) $(LK) $(LNKFLG) $** $(LINKAGE) $(SH_OBJ) -out:$@ !if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 !if exist $@.manifest del $@.manifest $(SH_OBJ) : $(DCDIR)\bin\trnmkobj -o mcf_sw -R OpenTP1_MCF |
All Rights Reserved. Copyright (C) 2012, Hitachi, Ltd.