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