home *** CD-ROM | disk | FTP | other *** search
Makefile | 1995-05-01 | 6.7 KB | 197 lines |
- #===================================================================
- #
- # PC/2 - Program Commander/2 Makefile
- #
- #===================================================================
-
- # ICC Flags
- # /Ti Include debug information for IPMD
- # /Kb+ Warning, if no prototypes found (prevents from incorrect params)
- # /c Compile only, we link more than one ressource
- # /Se Allow IBM C language extentions and migration
- # /Ms Set the default linkage to _System
- # /Re Produce Code in IBM C Set/2 Run Time environment
- # /ss Allow // as comments
- # /Gm+ Link with multitasking libraries, because we're multithreaded
- # /Rn No language environment. Allow system programming and subsystem development
- # /Ge- Link with libraries that assume a DLL
- # /Gs- Remove stack probes
- # /O+ Turn on code optimization (turns also function inlining on)
- # /Oi+ Turn on function inlining
-
- !ifndef SLOWVIDEO
- VIDEO =
- !else
- VIDEO = /DSLOWVIDEO
- !endif
-
- !ifndef NODEBUG
- CFLAGS = /Ti /Kb+ /c /Se /Ms /Re /ss /W3 /Gm+ $(VIDEO)
- CFLAGSDLL = /Ti /Kb+ /c /Se /Ms /Re /ss /W3 /Ge- $(VIDEO)
- !else
- CFLAGS = /Gs- /O+ /Kb+ /c /Se /Ms /Re /ss /W3 /Gm+ $(VIDEO)
- CFLAGSDLL = /Gs- /O+ /Kb+ /c /Se /Ms /Re /ss /W3 /Ge- $(VIDEO)
- !endif
-
- # LINK386 Flags
- # /DEBUG Include debug information for IPMD
- # /NOE NO Extented dictionary, don't assume any library dependencies
- # /NOD NO Default library, ignore the library names in object files
- # /NOI NO Ignore case
- # /A:16 Align on paragraph for PM programs
- # /M Produce map
- # /E Exepack to compress pages within the executable
- # /F Farcalltranslation to optimize far calls by avoiding selector reloads
- # /PACKC Overwrite Packcode default of 65530 to 0x40000
-
- !ifndef NODEBUG
- LFLAGS = /DEBUG /NOE /NOD /ALIGN:16 /MAP /NOI /E /F /PACKC:0x40000
- !else
- LFLAGS = /NOE /NOD /ALIGN:16 /NOI /E /F /PACKC:0x40000
- !endif
-
- # Libraries
- # DD4MBS Multitasking standard library
- # DD4NBS Singletasking standard library
- # OS2386 OS/2 2.0 Link library
- LIBS = DDE4MBS + OS2386
- LIBSS = DDE4NBS + OS2386
-
- # Directories
- # \. Executables, help panels, DLLs, documentation, profiles
- # \Source Source, object modules, headers
- SRC=Source
-
- # SC Flags
- # -v Verbose mode
- # -r Check that release order entries exist
- # -d Output directory of emitted file
- #
- # For the SOM compiler, the following environment variables are assumed
- # to be set for the IBM OS/2 Developer's Toolkit 2.1:
- #
- # SET SMINCLUDE=.;C:\TOOLKT21\SC;
- # SET SMTMP=G:\
- # SET SMEMIT=ih;h;ph;psc;sc;c;def
-
- SCFLAGS = -v -r -d $(SRC)
-
- CC = icc $(CFLAGS)
- SC = sc $(SCFLAGS)
- CCDLL = icc $(CFLAGSDLL)
- LINK = LINK386 $(LFLAGS)
-
- HEADERS = $(SRC)\PC2.h $(SRC)\Error.h
-
- ALL_OBJ = $(SRC)\PC2.obj $(SRC)\Dialog.obj $(SRC)\Utility.obj $(SRC)\Error.obj $(SRC)\Thread.obj
-
- all: PC2.exe PC2.hlp PC2Hook.dll PC2Spool.dll WPS2PC2.dll WPS2PC2.hlp
-
- clean:
- -!del *.exe
- -!del $(SRC)\*.obj
- -!del $(SRC)\*.res
- -!del $(SRC)\*.l
-
- save:
- -!del PC2-Save.zip
- zip -9 -r PC2 *
- unzip -t PC2
- copy PC2.zip PC2-Save.zip /v
-
- $(SRC)\Dialog.obj: $(SRC)\Dialog.c $(HEADERS)
- $(CC) /Fo$(SRC)\Dialog.obj $(SRC)\Dialog.c
-
- $(SRC)\Utility.obj: $(SRC)\Utility.c $(HEADERS)
- $(CC) /Fo$(SRC)\Utility.obj $(SRC)\Utility.c
-
- $(SRC)\Thread.obj: $(SRC)\Thread.c $(HEADERS)
- $(CC) /Fo$(SRC)\Thread.obj $(SRC)\Thread.c
-
- $(SRC)\Error.obj: $(SRC)\Error.c $(SRC)\Error.h
- $(CC) /Fo$(SRC)\Error.obj $(SRC)\Error.c
-
- $(SRC)\PC2.obj: $(SRC)\PC2.c $(HEADERS)
- $(CC) /Fo$(SRC)\PC2.obj $(SRC)\PC2.c
-
- $(SRC)\WPS2PC2.c: $(SRC)\WPS2PC2.csc $(HEADERS)
- $(SC) $(SRC)\WPS2PC2.csc
-
- $(SRC)\WPS2PC2.obj: $(SRC)\WPS2PC2.c $(SRC)\WPS2PC2.h $(SRC)\WPS2PC2.ih $(SRC)\WPS2PC2.sc $(HEADERS)
- $(CCDLL) /Fo$(SRC)\WPS2PC2.obj $(SRC)\WPS2PC2.c
-
- PC2.hlp: $(SRC)\PC2.ipp
- cd $(SRC) >NUL
- ipfcprep PC2.ipp PC2.ipf /D IPFC
- ipfc PC2.ipf
- cd .. >NUL
- copy $(SRC)\PC2.hlp PC2.hlp >NUL
- del $(SRC)\PC2.hlp >NUL
-
- $(SRC)\PC2.l: Makefile
- echo $(ALL_OBJ)+$(SRC)\Printf.obj > $(SRC)\PC2.l
- echo PC2.exe >> $(SRC)\PC2.l
- echo $(SRC)\PC2.map >> $(SRC)\PC2.l
- echo $(LIBS) >> $(SRC)\PC2.l
- echo $(SRC)\PC2.def >> $(SRC)\PC2.l
- echo $(SRC)\PC2Hook.obj > $(SRC)\PC2Hook.l
- echo PC2Hook.dll >> $(SRC)\PC2Hook.l
- echo $(SRC)\PC2Hook.map >> $(SRC)\PC2Hook.l
- echo $(LIBS) >> $(SRC)\PC2Hook.l
- echo $(SRC)\PC2Hook.def >> $(SRC)\PC2Hook.l
- echo $(SRC)\PC2Spool.obj > $(SRC)\PC2Spool.l
- echo PC2Spool.dll >> $(SRC)\PC2Spool.l
- echo $(SRC)\PC2Spool.map >> $(SRC)\PC2Spool.l
- echo $(LIBS) >> $(SRC)\PC2Spool.l
- echo $(SRC)\PC2Spool.def >> $(SRC)\PC2Spool.l
- echo $(SRC)\WPS2PC2.obj+$(SRC)\Printf.obj > $(SRC)\WPS2PC2.l
- echo WPS2PC2.dll >> $(SRC)\WPS2PC2.l
- echo $(SRC)\WPS2PC2.map >> $(SRC)\WPS2PC2.l
- echo $(LIBSS) + SOM >> $(SRC)\WPS2PC2.l
- echo $(SRC)\WPS2PC2.def >> $(SRC)\WPS2PC2.l
-
- $(SRC)\PC2.res: $(SRC)\PC2.rc $(SRC)\PC2.h $(SRC)\PC2.dlg
- cd $(SRC) >NUL
- rc -r PC2.rc
- cd .. >NUL
-
- $(SRC)\PC2Spool.res: $(SRC)\PC2Spool.rc $(SRC)\PC2.h
- cd $(SRC) >NUL
- rc -r PC2Spool.rc
- cd .. >NUL
-
- $(SRC)\WPS2PC2.res: $(SRC)\WPS2PC2.rc $(SRC)\PC2.h
- cd $(SRC) >NUL
- rc -r WPS2PC2.rc
- cd .. >NUL
-
- $(SRC)\PC2Hook.obj: $(SRC)\PC2Hook.c $(HEADERS)
- $(CCDLL) /Fo$(SRC)\PC2Hook.obj $(SRC)\PC2Hook.c
-
- PC2Hook.dll: $(SRC)\PC2Hook.obj $(SRC)\PC2Hook.def $(SRC)\PC2Hook.l
- $(LINK) @Source\PC2Hook.l
-
- $(SRC)\PC2Spool.obj: $(SRC)\PC2Spool.c $(HEADERS)
- $(CCDLL) /Fo$(SRC)\PC2Spool.obj $(SRC)\PC2Spool.c
-
- PC2Spool.dll: $(SRC)\PC2Spool.obj $(SRC)\PC2Spool.def $(SRC)\PC2Spool.l $(SRC)\PC2Spool.res
- $(LINK) @Source\PC2Spool.l
- rc $(SRC)\PC2Spool.res PC2Spool.dll
-
- WPS2PC2.dll: $(SRC)\WPS2PC2.obj $(SRC)\WPS2PC2.def $(SRC)\WPS2PC2.l $(SRC)\WPS2PC2.res
- $(LINK) @Source\WPS2PC2.l
- rc $(SRC)\WPS2PC2.res WPS2PC2.dll
-
- WPS2PC2.hlp: $(SRC)\WPS2PC2.ipp
- cd $(SRC) >NUL
- ipfcprep WPS2PC2.ipp WPS2PC2.ipf /D IPFC
- ipfc WPS2PC2.ipf
- cd .. >NUL
- copy $(SRC)\WPS2PC2.hlp WPS2PC2.hlp >NUL
- del $(SRC)\WPS2PC2.hlp >NUL
-
- PC2.exe: $(ALL_OBJ) $(SRC)\PC2.def $(SRC)\PC2.l $(SRC)\PC2.res
- $(LINK) @Source\PC2.l
- rc $(SRC)\PC2.res PC2.exe
-