################################################## ### ### Makefile for OS/2 version of splint ### ### designed for use with gmake (GNU make) ### ### based on David Evans' original makefile for Unix systems automatically ### generated by configure on a Linux system. ### ### configuration is set here and written to file config.inc included by ### other makefiles ### ### supported compilers are: ### emx/gcc ### IBM VisualAge C++ 3.0 ### ### other system requirements: ### HPFS filesystem (long filenames). ### ### *NOTE*, before running "make" edit this file to fit your local settings! ### ======================================================================== ### ### Commands: ### ### make all ### builds a release version of splint from scratch using optimizations ### ### This makefile uses gmake, the gnu version of make. ### ### Run gmake to build splint. ### gmake install to install. ### SHELL=/usr/bin/ksh ### ### This needs to be configured: ### ### Directory containing system include files: SYSTEM_LIBDIR = e:/usr/include ### default preprocessor command: CPPCMD = cpp ### directory for splint standard imports DEFAULT_LCLIMPORTDIR = .;e:/usr/lib/splint/imports ### directory for splint libraries DEFAULT_LARCHPATH = .;e:/usr/lib/splint/lib ### directory for splint binary INSTALLDIR = e:/usr/bin ### system include directory GCC_INCLUDE_DIR = e:/usr/include ### alternate system include directory GCC_INCLUDE_DIR2 = e:/emx/include ### ### Cosmetic stuff (goes into the executable ### LCL_OS2 = 1 TARGET_CPU = i586 UNAME = OS/2 Warp 4 (Paulina) ### ### do you have bison and/or flex? ### (Note: yacc will probably not work; lex might work but is not recommended.) ### BISON = bison FLEX = flex YFLAGS = -v -t -d LFLAGS = ### ### Set automatically: splint version and date etc. ### LCL_VERSION := $(shell grep "^VERSION" ../configure | sed "s/VERSION *= *//") LCL_DATE := $(shell date +"%d %b %Y") BUILD_DATE := $(shell date +"%c") ME := $(shell whoami) BASEDIR := $(shell (cd ..; cmd /c cd | tr '\\' '/')) LCL_COMPILE = Compiled using $(CC)\\n on $(UNAME) $(TARGET_CPU) $(BUILD_DATE) by $(ME),\\n OS/2 specific subversion is $(LCL_OS2) LCL_PARSE_VERSION = Splint $(LCL_VERSION) SPLINT_VERSION = $(LCL_PARSE_VERSION) -- $(LCL_DATE) ### ### Then, run: ### ### make ### ### ### file-related commands (I use emx GNUish utilities) CP = cp MV = mv CAT = cat RM = rm INSTALL = cp INSTALLFLAGS = ECHO = echo ### ### compiler --- gcc is recommended, but splint has been compiled ### without changes using cc on several platforms. ### # name of configuration: COMPILER=gcc-emx #COMPILER=gcc-os2 #COMPILER=icc-os2 # compile commands: ifeq ($(COMPILER), gcc-emx) CC = gcc -g CPPFLAGS=-I.\Headers -DSTDC_HEADERS=1 -DOS2 CFLAGS=-Wall OFLAG=-o LDFLAGS = -lfl O=.o EXEEXT=.exe else ifeq ($(COMPILER), gcc-os2) CC = gcc -Zsys -Zomf -O3 CPPFLAGS=-I.\Headers -DSTDC_HEADERS=1 -DOS2 CFLAGS=-Wall OFLAG=-o LDFLAGS = splint.def -lfl O=.obj EXEEXT=.exe else ifeq ($(COMPILER), icc-os2) # Shame! Normally no warnings should be turned off, but IBM's are # so stupid they warn me about each llassert(). Let's check our # code using splint then develop it on gcc and then move to IBMC... CC = icc -q -W2 -Dunlink=unlink -O+ -G5 -Gf+ -Gi+ -Gs+ #CSet 2.01 needs this: #-D__STDC__ CPPFLAGS=-I.\Headers -DSTDC_HEADERS=1 -DOS2 CFLAGS= OFLAG=-fe LDFLAGS = -B/noe setargv.obj fl.lib splint.def O=.obj EXEEXT=.exe endif endif endif .PHONY: all clean config confclean all: make.vars ../config.h setenv.cmd $(MAKE) --directory=../src -f Makefile.os2 all $(MAKE) --directory=../lib -f Makefile.os2 all make.vars: echo "CC = $(CC)" >make.vars echo "CPPFLAGS = $(CPPFLAGS)" >>make.vars echo "CFLAGS = $(CFLAGS)" >>make.vars echo "OFLAG = $(OFLAG)" >>make.vars echo "LDFLAGS = $(LDFLAGS)" >>make.vars echo "O = $(O)" >>make.vars echo "EXEEXT = $(EXEEXT)" >>make.vars echo "BISON = $(BISON)" >>make.vars echo "FLEX = $(FLEX)" >>make.vars echo "YFLAGS = $(YFLAGS)" >>make.vars echo "LFLAGS = $(LFLAGS)" >>make.vars echo "CPPCMD = $(CPPCMD)" >>make.vars echo "CP = $(CP)" >>make.vars echo "MV = $(MV)" >>make.vars echo "CAT = $(CAT)" >>make.vars echo "RM = $(RM)" >>make.vars echo "INSTALL = $(INSTALL)" >>make.vars echo "INSTALLFLAGS = $(INSTALLFLAGS)" >>make.vars echo "ECHO = $(ECHO)" >>make.vars ../config.h: os2config.h.in sed -e 's|@DEFAULT_LARCHPATH@|$(DEFAULT_LARCHPATH)|' \ -e 's|@DEFAULT_LCLIMPORTDIR@|$(DEFAULT_LCLIMPORTDIR)|' \ -e 's|@GCC_INCLUDE_DIR@|$(GCC_INCLUDE_DIR)|' \ -e 's|@GCC_INCLUDE_DIR2@|$(GCC_INCLUDE_DIR2)|' \ -e 's|@TARGET_CPU@|$(TARGET_CPU)|' \ -e 's|@UNAME@|$(UNAME)|' \ -e 's|@LCL_COMPILE@|$(LCL_COMPILE)|' \ -e 's|@LCL_PARSE_VERSION@|$(LCL_PARSE_VERSION)|' \ -e 's|@SPLINT_VERSION@|$(SPLINT_VERSION)|' \ -e 's|@SYSTEM_LIBDIR@|$(SYSTEM_LIBDIR)|' \ os2config.h.in >../config.h setenv.cmd: setenv.cmd.in sed -e 's|@LCL_VERSION@|$(LCL_VERSION)|' \ -e 's|@BASEDIR@|$(BASEDIR)|' \ setenv.cmd.in | tr '/' '\\\\\\' >setenv.cmd config: make.vars ../config.h setenv.cmd confclean: $(RM) -f make.vars ../config.h setenv.cmd clean: confclean $(MAKE) --directory=../src -f Makefile.os2 clean $(MAKE) --directory=../lib -f Makefile.os2 clean