source: trunk/make/setup.os2prfemx.mk@ 8717

Last change on this file since 8717 was 8717, checked in by bird, 23 years ago

Added *_AS_2_FILE macro.

File size: 3.9 KB
Line 
1# $Id: setup.os2prfemx.mk,v 1.3 2002-06-19 02:20:01 bird Exp $
2
3# ---OS2, PROFILE, EMX----------------------------
4ENV_NAME="OS/2, Profile, EMX/GCC Compiler"
5ENV_STATUS=OK
6!if "$(ENV_ENVS)" == ""
7ENV_ENVS=vac308 emx emxpgcc
8!else
9ENV_ENVS_FORCE=vac308 emx emxpgcc
10!endif
11SPACE=_
12!undef ENV_16BIT
13
14
15#
16# Make sure ilink finds the libraries.
17#
18!if [set LIB=$(PATH_EMX)\lib\mt;$(LIBRARY_PATH);$(LIB)]
19!endif
20
21
22#
23# Include some shared standard stuff: ALP, VAC optional stuff.
24#
25!include $(PATH_MAKE)\setup.os2prfalp.mk
26!include $(PATH_MAKE)\setup.optional.emx.mk
27
28
29#
30# The tools
31#
32AR=ilib.exe
33CC=gcc.exe
34CXX=gcc.exe
35LINK=ilink.exe
36IMPLIB=implib.exe
37RC=rc.exe
38RL=rc.exe
39EXEPACK=lxlite.exe
40
41
42#
43# The flags
44#
45AR_FLAGS=/nologo /noignorecase
46AR_CMD=$(AR) $(AR_FLAGS) $@ @$(TARGET_LNK)
47_AR_LNK1= "$(TARGET_OBJS: ="&^
48")"
49AR_LNK1= $(_AR_LNK1:""=)
50AR_LNK2= $(@R).lst
51
52CC_FLAGS=-c -DDEBUG -DOS2 -D__32BIT__ -DMODEL=FLAT -Zomf -Wall -Wstrict-prototypes -Wno-trigraphs \
53 -fno-common -march=i586 -g $(_CC_OPTIONAL) \
54 $(CC_DEFINES:/D=-D) $(ALL_DEFINES:/D=-D) $(BUILD_DEFINES:/D=-D) $(CC_INCLUDES:^;= -I) $(ALL_INCLUDES:^;= -I) -I$(PATH_INCLUDES:^;= -I)
55CC_FLAGS_EXE=$(CC_FLAGS: = ) -Zmt -Zexe
56CC_FLAGS_DLL=$(CC_FLAGS: = ) -Zmt -Zdll
57CC_FLAGS_SYS=$(CC_FLAGS: = ) -DRING0 -mno-probe -Zdll -Zno-rte
58CC_FLAGS_VDD=$(CC_FLAGS_SYS: = )
59CC_FLAGS_IFS=$(CC_FLAGS_SYS: = ) -Zdll
60CC_OBJ_OUT=-o$(SPACE:_= )
61#CC_LST_OUT=-S -o$(SPACE:_= )
62CC_PC_2_STDOUT=-C -E
63CC_AS_2_FILE=-S -o$(SPACE:_= )
64
65
66CXX_FLAGS=-c -DDEBUG -DOS2 -D__32BIT__ -DMODEL=FLAT -Zomf -Wall -Wstrict-prototypes -Wno-trigraphs \
67 -fno-common -march=i586 -g $(_CXX_OPTIONAL) \
68 $(CXX_DEFINES:/D=-D) $(ALL_DEFINES:/D=-D) $(BUILD_DEFINES:/D=-D) $(CXX_INCLUDES:^;= -I) $(ALL_INCLUDES:^;= -I) -I$(PATH_INCLUDES:^;= -I)
69CXX_FLAGS_EXE=$(CXX_FLAGS: = ) -Zmt -Zexe
70CXX_FLAGS_DLL=$(CXX_FLAGS: = ) -Zmt -Zdll
71CXX_FLAGS_SYS=$(CXX_FLAGS: = ) -DRING0 -mno-probe -Zno-rte -fno-exceptions
72CXX_FLAGS_VDD=$(CXX_FLAGS_SYS: = )
73CXX_FLAGS_IFS=$(CXX_FLAGS_SYS: = ) -Zdll
74CXX_OBJ_OUT=-o$(SPACE:_= )
75#CXX_LST_OUT=-S -o$(SPACE:_= )
76CXX_PC_2_STDOUT=-C -E
77CXX_AS_2_FILE=-S -o$(SPACE:_= )
78
79!if "$(CC_AS_CXX)" != ""
80! if "$(CXX_AS_CC)" != ""
81! if [@(ECHO) $(CLRERR)Error: Do you think you're smart? CC_AS_CXX and CXX_AS_CC is mutual execlusive!$(CLRRST)]
82! endif
83! error
84! endif
85CC=g++
86CC_FLAGS_EXE=$(CXX_FLAGS_EXE)
87CC_FLAGS_DLL=$(CXX_FLAGS_DLL)
88CC_FLAGS_SYS=$(CXX_FLAGS_SYS)
89CC_FLAGS_VDD=$(CXX_FLAGS_VDD)
90CC_FLAGS_IFS=$(CXX_FLAGS_IFS)
91!endif
92!if "$(CXX_AS_CC)" != ""
93! if [@(ECHO) $(CLRERR)Error: CXX_AS_CC is not supported by this compiler!$(CLRRST)]
94! endif
95! error
96!endif
97
98IMPLIB_FLAGS=/NOI /Nologo
99
100LINK_FLAGS=/nofree /nologo /de /map /linenumbers /NOIgnorecase /NOE /NOD /Optfunc /PACKCODE /PACKDATA
101LINK_FLAGS_EXE=$(LINK_FLAGS) /EXECutable /STACK:$(TARGET_STACKSIZE)
102LINK_FLAGS_DLL=$(LINK_FLAGS) /DLL
103LINK_FLAGS_SYS=$(LINK_FLAGS) /PDD /Align:16
104LINK_FLAGS_VDD=$(LINK_FLAGS) /VDD /Align:16
105LINK_FLAGS_IFS=$(LINK_FLAGS_DLL)
106LINK_CMD_EXE=$(LINK) $(LINK_FLAGS_EXE) crt0.obj @$(TARGET_LNK)
107LINK_CMD_DLL=$(LINK) $(LINK_FLAGS_DLL) dll0.obj @$(TARGET_LNK)
108LINK_CMD_SYS=$(LINK) $(LINK_FLAGS_SYS) crt0.obj @$(TARGET_LNK)
109LINK_CMD_VDD=$(LINK) $(LINK_FLAGS_VDD) crt0.obj @$(TARGET_LNK)
110LINK_CMD_IFS=$(LINK) $(LINK_FLAGS_IFS) dll0.obj @$(TARGET_LNK)
111LINK_LNK1=$(TARGET_OBJS: =+^
112),
113LINK_LNK2=$(TARGET),
114LINK_LNK3=$(TARGET_MAP),
115LINK_LNK4=$(TARGET_LIBS: =+^
116) end.lib,
117LINK_LNK5=$(TARGET_DEF_LINK)
118
119RC_FLAGS=-r -n $(RC_DEFINES) $(ALL_DEFINES) $(BUILD_DEFINES) $(RC_INCLUDES:-I=-i ) $(ALL_INCLUDES:-I=-i ) -i $(PATH_INCLUDES:;= -i )
120RL_FLAGS=-x2 -n
121
122#
123# Libraries and object files.
124#
125LIB_OS = os2386.lib
126LIB_C_OBJ = c_alias.lib gcc.lib g.lib c.lib c_app.lib c.lib gcc.lib emx.lib os2.lib emx2.lib
127LIB_C_DLL = c_alias.lib c_static.lib c_import.lib os2.lib emx2.lib
128LIB_C_RTDLL = c_alias.lib c_static.lib emx2.lib
129LIB_C_NRE = c_alias.lib gcc.lib g.lib c.lib c_dllnrt.lib os2.lib
130LIB_C_DMNGL =
131OBJ_PROFILE =
132
133# ---OS2, PROFILE, EMX----------------------------
134
Note: See TracBrowser for help on using the repository browser.