1# -*- Makefile -*- for the GHDL Run Time library. 2# Copyright (C) 2002, 2003, 2004, 2005 Tristan Gingold 3# 4# This program is free software: you can redistribute it and/or modify 5# it under the terms of the GNU General Public License as published by 6# the Free Software Foundation, either version 2 of the License, or 7# (at your option) any later version. 8# 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY; without even the implied warranty of 11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12# GNU General Public License for more details. 13# 14# You should have received a copy of the GNU General Public License 15# along with this program. If not, see <gnu.org/licenses>. 16GRT_FLAGS=-g -O 17GRT_ADAFLAGS=-gnatn 18 19ADAC=gcc 20CC=gcc 21GNATFLAGS=$(CFLAGS) -gnatf -gnaty3befhkmr -gnatwlu 22GHDL1=../ghdl1-gcc$(EXEEXT) 23GRTSRCDIR=. 24GRT_RANLIB=ranlib 25 26INSTALL=install 27INSTALL_DATA=$(INSTALL) -m 644 28 29prefix=/usr/local 30exec_prefix=$(prefix) 31libdir=$(exec_prefix)/lib 32grt_libdir=$(libdir) 33 34target:=$(shell $(CC) -dumpmachine) 35 36all: grt-all 37install: grt-install 38clean: grt-clean 39 $(RM) *~ 40 41show_target: 42 echo "Target is $(target)" 43 44include Makefile.inc 45 46 47GRT_CFLAGS=$(GRT_FLAGS) -Wall 48ghwdump: ghwdump.o ghwlib.o 49 $(CC) $(GRT_CFLAGS) -o $@ ghwdump.o ghwlib.o 50 51ghwlib.o: ghwlib.c ghwlib.h 52 $(CC) -c $(GRT_CFLAGS) -o $@ $< 53ghwdump.o: ghwdump.c ghwlib.h 54 $(CC) -c $(GRT_CFLAGS) -o $@ $< 55