source: trunk/make/helpers.in@ 249

Last change on this file since 249 was 249, checked in by umoeller, 23 years ago

Build updates, moved files from warpin.

  • Property svn:eol-style set to CRLF
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1#
2# Pre-include file for the main helpers makefile.
3# This contains shared definitions for everything
4# under the xwphelpers src\directory.
5#
6
7!ifndef PROJECT_BASE_DIR
8!error in $(MAKEDIR)\makefile: PROJECT_BASE_DIR must be set before calling the HELPERS makefile. Terminating.
9!endif
10
11# !if [@echo $(MAKEDIR)\makefile: PROJECT_BASE_DIR is: $(PROJECT_BASE_DIR)]
12# !endif
13
14# include setup (compiler options etc.)
15!include $(PROJECT_BASE_DIR)\config.in
16!include $(PROJECT_BASE_DIR)\make\setup.in
17
18!ifndef HELPERS_OUTPUT_DIR
19!error in $(MAKEDIR)\makefile: HELPERS_OUTPUT_DIR must be set before calling the HELPERS makefile. Terminating.
20!endif
21
22# Define the suffixes for files which NMAKE will work on.
23# .SUFFIXES is a reserved NMAKE keyword ("pseudotarget") for
24# defining file extensions that NMAKE will recognize in inference
25# rules.
26.SUFFIXES: .c .h .ih .obj .lib .dll
27
28# OUTPUTDIR specifies the directory where we will put the
29# files created by this makefile.
30OUTPUTDIR = $(HELPERS_OUTPUT_DIR)
31
32# !if [@echo $(MAKEDIR)\makefile: helpers OBJs will be written to $(OUTPUTDIR)]
33# !endif
34
35!if [@md $(OUTPUTDIR) 2> NUL]
36!endif
37
38# helpers include path
39INC = ..\..\include
40HLPINC = $(INC)\helpers
41
42PROJECTINC = $(PROJECT_BASE_DIR)\include
43
44# Now define inference rules for what to do with certain file
45# types, based on their file extension.
46# The syntax we need here is ".fromext.toext".
47# So whenever NMAKE encounters a .toext file, it
48# executes what we specify here.
49# The ugly {} brackets are some awkward syntax for specifying
50# files in other directories.
51
52# Special macros used here: $(@B) is the current target w/out ext.
53
54# -- compile C files to .OBJ files, using the CC_HELPPERS macro
55# given to us.
56# The output will be placed in the directory specified by
57# the OUTPUTDIR variable (set above).
58
59.c.{$(OUTPUTDIR)}.obj:
60 @echo $(MAKEDIR)\makefile: Compiling $(@B).c
61!ifdef EMX
62 $(CC_HELPERS) -o $(OUTPUTDIR)\$(@B).obj $(@B).c
63!else
64!ifndef PRECH
65 $(CC_HELPERS) /Fo$(OUTPUTDIR)\$(@B).obj $(@B).c
66!else
67 $(CC_HELPERS) /fi"$(PRECH)\$(@B).pch" /si"$(PRECH)\$(@B).pch" /Fo$(OUTPUTDIR)\$(@B).obj $(@B).c
68!endif
69!endif
70
71
Note: See TracBrowser for help on using the repository browser.