| 1 | # $Id: Makefile 1006 2004-01-18 10:01:17Z bird $
|
|---|
| 2 | ## @file
|
|---|
| 3 | #
|
|---|
| 4 | # Makefile for the benchmark.
|
|---|
| 5 | #
|
|---|
| 6 | # Copyright (c) 2003 knut st. osmundsen <bird-srcspam@anduin.net>
|
|---|
| 7 | #
|
|---|
| 8 | #
|
|---|
| 9 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 10 | # it under the terms of the GNU General Public License as published by
|
|---|
| 11 | # the Free Software Foundation; either version 2 of the License, or
|
|---|
| 12 | # (at your option) any later version.
|
|---|
| 13 | #
|
|---|
| 14 | # This program is distributed in the hope that it will be useful,
|
|---|
| 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 17 | # GNU General Public License for more details.
|
|---|
| 18 | #
|
|---|
| 19 | # You should have received a copy of the GNU General Public License
|
|---|
| 20 | # along with This program; if not, write to the Free Software
|
|---|
| 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|---|
| 22 | #
|
|---|
| 23 | #
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 | ifdef USE_VAC
|
|---|
| 27 | #
|
|---|
| 28 | # VAC setup.
|
|---|
| 29 | #
|
|---|
| 30 | CCFLAGS = /Ti- -O
|
|---|
| 31 | CCLD_STATIC = icc $(CCFLAGS) /Gd-
|
|---|
| 32 | CCLD_DYNAMIC = icc $(CCFLAGS) /Gd
|
|---|
| 33 | E = .exe
|
|---|
| 34 | O = .obj
|
|---|
| 35 | TRG = /Fo$@
|
|---|
| 36 | endif
|
|---|
| 37 |
|
|---|
| 38 | ifdef USE_EMX
|
|---|
| 39 | #
|
|---|
| 40 | # EMX setup.
|
|---|
| 41 | #
|
|---|
| 42 | CCFLAGS = -s -O2 -Zomf -D__OS2__
|
|---|
| 43 | CCLD_STATIC = gcc $(CCFLAGS)
|
|---|
| 44 | CCLD_DYNAMIC = gcc $(CCFLAGS) -Zcrtdll
|
|---|
| 45 | E = .exe
|
|---|
| 46 | O = .o
|
|---|
| 47 | TRG = -o $@
|
|---|
| 48 | endif
|
|---|
| 49 |
|
|---|
| 50 | ifdef USE_LINUX
|
|---|
| 51 | #
|
|---|
| 52 | # Linux GCC setup.
|
|---|
| 53 | #
|
|---|
| 54 | CCFLAGS = -s -O3 -D__NOTPC__
|
|---|
| 55 | CCLD_STATIC = gcc $(CCFLAGS) -static
|
|---|
| 56 | CCLD_DYNAMIC = gcc $(CCFLAGS)
|
|---|
| 57 | E =
|
|---|
| 58 | O = .o
|
|---|
| 59 | TRG = -o $@
|
|---|
| 60 | endif
|
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 | ifndef TRG
|
|---|
| 64 | #
|
|---|
| 65 | # Innotek GCC setup.
|
|---|
| 66 | #
|
|---|
| 67 | CCFLAGS = -s -O3 -Zomf
|
|---|
| 68 | CCLD_STATIC = gcc $(CCFLAGS) -static
|
|---|
| 69 | CCLD_DYNAMIC = gcc $(CCFLAGS)
|
|---|
| 70 | E = .exe
|
|---|
| 71 | O = .o
|
|---|
| 72 | TRG = -o $@
|
|---|
| 73 | endif
|
|---|
| 74 |
|
|---|
| 75 |
|
|---|
| 76 |
|
|---|
| 77 | #
|
|---|
| 78 | # Main rules.
|
|---|
| 79 | #
|
|---|
| 80 | all: startup1 micro$E benchmark$E
|
|---|
| 81 |
|
|---|
| 82 | check: all
|
|---|
| 83 | ./benchmark$E
|
|---|
| 84 |
|
|---|
| 85 | clean:
|
|---|
| 86 | rm -f startup1-static$E startup1-dynamic$E micro$E benchmark$E
|
|---|
| 87 | ifneq ($O,)
|
|---|
| 88 | rm -f *$O
|
|---|
| 89 | endif
|
|---|
| 90 |
|
|---|
| 91 |
|
|---|
| 92 | #
|
|---|
| 93 | # micro - calibrator.
|
|---|
| 94 | #
|
|---|
| 95 | micro.exe: micro.asm
|
|---|
| 96 | alp -Sv:alp -Mb micro.asm
|
|---|
| 97 | ilink /PMTYPE:VIO /STUB:os2stub.bin /nologo micro.obj
|
|---|
| 98 |
|
|---|
| 99 | #
|
|---|
| 100 | # startup1.c - static and dynamic version.
|
|---|
| 101 | #
|
|---|
| 102 | .PHONY: startup1
|
|---|
| 103 | startup1: startup1-static$E startup1-dynamic$E
|
|---|
| 104 |
|
|---|
| 105 | startup1-static$E: startup1.c
|
|---|
| 106 | $(CCLD_STATIC) $(TRG) $<
|
|---|
| 107 | startup1-dynamic$E: startup1.c
|
|---|
| 108 | $(CCLD_DYNAMIC) $(TRG) $<
|
|---|
| 109 |
|
|---|
| 110 |
|
|---|
| 111 | #
|
|---|
| 112 | # Benchmark driver.
|
|---|
| 113 | #
|
|---|
| 114 | benchmark$E: benchmark.c PrfTiming.h
|
|---|
| 115 | $(CCLD_DYNAMIC) $(TRG) benchmark.c
|
|---|
| 116 |
|
|---|