Made changes to allow choice of either a.out format or omf, for object files OS2_BRANCH
authordanda
Sun, 19 Apr 1998 08:34:44 +0000
branchOS2_BRANCH
changeset 44 6901f8d71b360662e30fe411aad971eb98363a55
parent 43 e8a6ff1d2b065ca471c91dc56870ddb4da113263
child 45 87ccc11007ab5126e5d34bd16e2a171960cd72e9
push idunknown
push userunknown
push dateunknown
Made changes to allow choice of either a.out format or omf, for object files
config/OS2.mk
--- a/config/OS2.mk
+++ b/config/OS2.mk
@@ -95,37 +95,47 @@ ifdef XP_OS2_VACPP
 OS_LIBS 		= so32dll.lib tcp32dll.lib
 
 DEFINES += -DXP_OS2_VACPP
 
 else
 CC			= gcc
 CCC			= gcc
 LINK			= gcc
-AR      		= ar -q $@
 RC 			= rc.exe
 FILTER  		= emxexp
 IMPLIB  		= emximp -o
 
+# Determine which object format to use.  Two choices:
+# a.out and omf.  We default to a.out.
+ifeq($(MOZ_OS2_EMX_OBJECTFORMAT), OMF)
+OMF_FLAG 	= -Zomf
+AR		= emxomfar r $@
+LIB_SUFFIX	= lib
+else
+AR      	= ar -q $@
+LIB_SUFFIX	= a
+endif
+
 OS_LIBS     		= -lsocket -lemxio
 
-LIB_SUFFIX 		= a
+LIB_SUFFIX 		= lib
 
 DEFINES += -DXP_OS2_EMX
 
-OS_CFLAGS     		= -I. -Wall -Zmt $(DEFINES)
-OS_EXE_CFLAGS 		= -I. -Wall -Zmt $(DEFINES)
-OS_DLLFLAGS 		= -Zmt -Zdll -Zcrtdll -o $@
+OS_CFLAGS     		= $(OMF_FLAG) -I. -Wall -Zmt $(DEFINES)
+OS_EXE_CFLAGS 		= $(OS_CFLAGS)
+OS_DLLFLAGS 		= $(OMF_FLAG) -Zmt -Zdll -Zcrtdll -o $@
 
 ifdef BUILD_OPT
 OPTIMIZER		= -O3
 DLLFLAGS		= 
 EXEFLAGS    		= -Zmt -o $@
 else
 OPTIMIZER		= -g
 DLLFLAGS		= -g
-EXEFLAGS		= -g -Zmt -L$(DIST)/lib -o $@
+EXEFLAGS		= $(OMF_FLAG) -g -Zmt -L$(DIST)/lib -o $@
 endif
 
 AR_EXTRA_ARGS 		=
 endif