[svn] / ecrypt / trunk / test / compiler.mk  

svn: ecrypt/trunk/test/compiler.mk

File: [svn] / ecrypt / trunk / test / compiler.mk (download)
Revision: 91, Thu Aug 25 10:31:14 2005 UTC (7 years, 8 months ago) by cdecanni
File size: 948 byte(s)
* fixed some small problems when running under windows.
comp ?= gcc
cc ?= gcc

ifeq ($(comp),msvc)
  CC = $(cc) -nologo
  version = $(cc)

  opt ?= -Ox

  obj = .obj
  exe = .exe

  ifeq ($(shell uname),Linux) 
    run = wine
  endif
endif

ifeq ($(comp),icc)
  CC = $(cc) $(std)
  version = $(cc) -v

  opt ?= -O3
endif

ifeq ($(comp),gcc)
  CC = $(cc) -Wall -pedantic $(std)
  version = $(cc) -v

  opt ?= -O2 -fomit-frame-pointer
endif

ifeq ($(comp),mingw)
  CC = $(cc) -Wall -pedantic $(std)
  version = $(cc) -v

  opt ?= -O2 -fomit-frame-pointer

  exe = .exe

  ifeq ($(shell uname),Linux) 
    run = wine
  endif
endif

ifeq ($(comp),cc)
  CC = $(cc)

  ifeq ($(shell uname),HP-UX)
    version = ($(cc) -V -E - < /dev/null > /dev/null)
  else
    version = $(cc) -V
  endif

  opt ?= -fast
endif

obj ?= .o
exe ?=

%$(obj): %.c
	$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c -o $@ $<

%$(id)$(exe): %$(obj)
	$(CC) $(LDFLAGS) $(TARGET_ARCH) $^ -o $@

version:
	@$(version) 2>&1

.PHONY: version

eSTREAM Project

Powered by ViewCVS 1.0-dev
(Powered by Apache)

ViewCVS and CVS Help