]> andersk Git - splint.git/blame - os2/Makefile.os2
Removed obsolete OS/2 test makefiles.
[splint.git] / os2 / Makefile.os2
CommitLineData
e5a87a6c 1##################################################\r
2###\r
87fa79e5 3### Makefile for OS/2 version of splint\r
e5a87a6c 4###\r
5### designed for use with gmake (GNU make)\r
6###\r
7### based on David Evans' original makefile for Unix systems automatically\r
8### generated by configure on a Linux system.\r
9###\r
10### configuration is set here and written to file config.inc included by\r
11### other makefiles\r
12###\r
13### supported compilers are:\r
14### emx/gcc\r
15### IBM VisualAge C++ 3.0\r
16###\r
17### other system requirements:\r
18### HPFS filesystem (long filenames).\r
19###\r
20### *NOTE*, before running "make" edit this file to fit your local settings!\r
21### ========================================================================\r
22###\r
23### Commands:\r
24###\r
25### make all\r
87fa79e5 26### builds a release version of splint from scratch using optimizations\r
e5a87a6c 27###\r
28### This makefile uses gmake, the gnu version of make.\r
29###\r
87fa79e5 30### Run gmake to build splint.\r
e5a87a6c 31### gmake install to install.\r
32###\r
33\r
87fa79e5 34SHELL=/usr/bin/ksh\r
e5a87a6c 35\r
e5a87a6c 36\r
87fa79e5 37###\r
38### This needs to be configured:\r
39###\r
e5a87a6c 40\r
41### Directory containing system include files:\r
42\r
87fa79e5 43SYSTEM_LIBDIR = e:/usr/include\r
e5a87a6c 44\r
45### default preprocessor command:\r
46\r
87fa79e5 47CPPCMD = cpp \r
48\r
49### directory for splint standard imports\r
50DEFAULT_LCLIMPORTDIR = .;e:/usr/lib/splint/imports\r
51\r
52### directory for splint libraries\r
53DEFAULT_LARCHPATH = .;e:/usr/lib/splint/lib\r
54\r
55### directory for splint binary\r
56INSTALLDIR = e:/usr/bin\r
57\r
58### system include directory\r
59GCC_INCLUDE_DIR = e:/usr/include\r
60\r
61### alternate system include directory\r
62GCC_INCLUDE_DIR2 = e:/emx/include\r
e5a87a6c 63\r
64###\r
87fa79e5 65### Cosmetic stuff (goes into the executable\r
e5a87a6c 66###\r
e5a87a6c 67\r
87fa79e5 68LCL_OS2 = 1\r
69TARGET_CPU = i586\r
70UNAME = OS/2 Warp 4 (Paulina)\r
e5a87a6c 71\r
87fa79e5 72###\r
73### do you have bison and/or flex?\r
74### (Note: yacc will probably not work; lex might work but is not recommended.)\r
75###\r
e5a87a6c 76\r
87fa79e5 77BISON = bison\r
78FLEX = flex\r
79YFLAGS = -v -t -d\r
80LFLAGS =\r
e5a87a6c 81\r
87fa79e5 82###\r
83### Set automatically: splint version and date etc.\r
84###\r
e5a87a6c 85\r
6ee276d2 86LCL_VERSION := $(shell grep "^VERSION" ../configure | sed "s/VERSION *= *//")\r
87fa79e5 87LCL_DATE := $(shell date +"%d %b %Y")\r
88BUILD_DATE := $(shell date +"%c")\r
89ME := $(shell whoami)\r
90BASEDIR := $(shell (cd ..; cmd /c cd | tr '\\' '/'))\r
e5a87a6c 91\r
87fa79e5 92LCL_COMPILE = Compiled using $(CC)\\n on $(UNAME) $(TARGET_CPU) $(BUILD_DATE) by $(ME),\\n OS/2 specific subversion is $(LCL_OS2)\r
93LCL_PARSE_VERSION = Splint $(LCL_VERSION)\r
94SPLINT_VERSION = $(LCL_PARSE_VERSION) -- $(LCL_DATE)\r
e5a87a6c 95\r
e5a87a6c 96\r
6ee276d2 97###\r
98### Then, run:\r
99###\r
100### make\r
101###\r
102###\r
103\r
104### file-related commands (I use emx GNUish utilities)\r
105CP = cp\r
106MV = mv\r
107CAT = cat\r
108RM = rm\r
109INSTALL = cp\r
110INSTALLFLAGS = \r
111ECHO = echo\r
112\r
e5a87a6c 113###\r
87fa79e5 114### compiler --- gcc is recommended, but splint has been compiled\r
e5a87a6c 115### without changes using cc on several platforms.\r
116###\r
117\r
118# name of configuration:\r
119COMPILER=gcc-emx\r
120#COMPILER=gcc-os2\r
121#COMPILER=icc-os2\r
122\r
123# compile commands:\r
124ifeq ($(COMPILER), gcc-emx)\r
125 CC = gcc -g\r
126 CPPFLAGS=-I.\Headers -DSTDC_HEADERS=1 -DOS2\r
127 CFLAGS=-Wall \r
128 OFLAG=-o \r
87fa79e5 129 LDFLAGS = -lfl\r
e5a87a6c 130 O=.o\r
87fa79e5 131 EXEEXT=.exe\r
e5a87a6c 132else\r
133 ifeq ($(COMPILER), gcc-os2)\r
134 CC = gcc -Zsys -Zomf -O3\r
135 CPPFLAGS=-I.\Headers -DSTDC_HEADERS=1 -DOS2\r
136 CFLAGS=-Wall \r
137 OFLAG=-o \r
87fa79e5 138 LDFLAGS = splint.def -lfl\r
e5a87a6c 139 O=.obj\r
87fa79e5 140 EXEEXT=.exe\r
e5a87a6c 141 else\r
142 ifeq ($(COMPILER), icc-os2)\r
143 # Shame! Normally no warnings should be turned off, but IBM's are\r
144 # so stupid they warn me about each llassert(). Let's check our\r
87fa79e5 145 # code using splint then develop it on gcc and then move to IBMC...\r
e5a87a6c 146 CC = icc -q -W2 -Dunlink=unlink -O+ -G5 -Gf+ -Gi+ -Gs+ \r
147 #CSet 2.01 needs this:\r
148 #-D__STDC__\r
149 CPPFLAGS=-I.\Headers -DSTDC_HEADERS=1 -DOS2 \r
150 CFLAGS=\r
151 OFLAG=-fe\r
87fa79e5 152 LDFLAGS = -B/noe setargv.obj fl.lib splint.def\r
e5a87a6c 153 O=.obj\r
87fa79e5 154 EXEEXT=.exe\r
e5a87a6c 155 endif\r
156 endif\r
157endif\r
158\r
87fa79e5 159.PHONY: all clean config confclean\r
160\r
161all: make.vars ../config.h setenv.cmd\r
162 $(MAKE) --directory=../src -f Makefile.os2 all\r
163 $(MAKE) --directory=../lib -f Makefile.os2 all\r
164\r
165make.vars:\r
166 echo "CC = $(CC)" >make.vars\r
167 echo "CPPFLAGS = $(CPPFLAGS)" >>make.vars\r
168 echo "CFLAGS = $(CFLAGS)" >>make.vars\r
169 echo "OFLAG = $(OFLAG)" >>make.vars\r
170 echo "LDFLAGS = $(LDFLAGS)" >>make.vars\r
171 echo "O = $(O)" >>make.vars\r
172 echo "EXEEXT = $(EXEEXT)" >>make.vars\r
173 echo "BISON = $(BISON)" >>make.vars\r
174 echo "FLEX = $(FLEX)" >>make.vars\r
175 echo "YFLAGS = $(YFLAGS)" >>make.vars\r
176 echo "LFLAGS = $(LFLAGS)" >>make.vars\r
177 echo "CPPCMD = $(CPPCMD)" >>make.vars\r
178 echo "CP = $(CP)" >>make.vars\r
179 echo "MV = $(MV)" >>make.vars\r
180 echo "CAT = $(CAT)" >>make.vars\r
181 echo "RM = $(RM)" >>make.vars\r
182 echo "INSTALL = $(INSTALL)" >>make.vars\r
183 echo "INSTALLFLAGS = $(INSTALLFLAGS)" >>make.vars\r
184 echo "ECHO = $(ECHO)" >>make.vars\r
185\r
186../config.h: os2config.h.in\r
6ee276d2 187 sed -e 's|@DEFAULT_LARCHPATH@|$(DEFAULT_LARCHPATH)|' \\r
87fa79e5 188 -e 's|@DEFAULT_LCLIMPORTDIR@|$(DEFAULT_LCLIMPORTDIR)|' \\r
189 -e 's|@GCC_INCLUDE_DIR@|$(GCC_INCLUDE_DIR)|' \\r
190 -e 's|@GCC_INCLUDE_DIR2@|$(GCC_INCLUDE_DIR2)|' \\r
191 -e 's|@TARGET_CPU@|$(TARGET_CPU)|' \\r
192 -e 's|@UNAME@|$(UNAME)|' \\r
193 -e 's|@LCL_COMPILE@|$(LCL_COMPILE)|' \\r
194 -e 's|@LCL_PARSE_VERSION@|$(LCL_PARSE_VERSION)|' \\r
195 -e 's|@SPLINT_VERSION@|$(SPLINT_VERSION)|' \\r
196 -e 's|@SYSTEM_LIBDIR@|$(SYSTEM_LIBDIR)|' \\r
197 os2config.h.in >../config.h\r
198\r
199setenv.cmd: setenv.cmd.in\r
6ee276d2 200 sed -e 's|@LCL_VERSION@|$(LCL_VERSION)|' \\r
87fa79e5 201 -e 's|@BASEDIR@|$(BASEDIR)|' \\r
6ee276d2 202 setenv.cmd.in | tr '/' '\\\\\\' >setenv.cmd\r
87fa79e5 203\r
204config: make.vars ../config.h setenv.cmd\r
205\r
206confclean:\r
207 $(RM) -f make.vars ../config.h setenv.cmd\r
208\r
209clean: confclean\r
210 $(MAKE) --directory=../src -f Makefile.os2 clean\r
211 $(MAKE) --directory=../lib -f Makefile.os2 clean\r
This page took 0.119157 seconds and 5 git commands to generate.