Skip to content

Commit fbd8385

Browse files
author
Stefan Reinauer
committed
initial merge of David Paktor's fine work.
I redid all of the Makefiles and fixed some minor issues with the code. git-svn-id: svn://coreboot.org/openbios/fcode-utils@76 f158a5a8-5612-0410-a976-696ce0be7e32
1 parent 64de277 commit fbd8385

55 files changed

Lines changed: 23519 additions & 2577 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

detok/Makefile

Lines changed: 30 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#
2-
# OpenBIOS - free your system!
3-
# ( detokenizer )
4-
#
5-
# This program is part of a free implementation of the IEEE 1275-1994
2+
# OpenBIOS - free your system!
3+
# ( Utilities )
4+
#
5+
# This program is part of a free implementation of the IEEE 1275-1994
66
# Standard for Boot (Initialization Configuration) Firmware.
77
#
8-
# Copyright (C) 2001-2005 Stefan Reinauer, <stepan@openbios.org>
8+
# Copyright (C) 2001-2006 Stefan Reinauer <stepan@openbios.org>
9+
# Copyright (C) 2006 coresystems GmbH <info@coresystems.de>
910
#
1011
# This program is free software; you can redistribute it and/or modify
1112
# it under the terms of the GNU General Public License as published by
@@ -21,48 +22,37 @@
2122
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
2223
#
2324

24-
ARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ -e "s/Power Macintosh/ppc/")
25-
TOPDIR := $(shell /bin/pwd)
26-
BUILDDIR ?= $(TOPDIR)/obj-$(ARCH)
25+
PROGRAM = detok
2726

28-
VPATH := $(BUILDDIR)
27+
CC = gcc
28+
STRIP = strip
29+
INCLUDES = -I../shared
30+
#CFLAGS = -O2 -g -Wall
31+
CFLAGS = -Os -Wall -Wno-pointer-sign
32+
LDFLAGS =
2933

34+
OBJS = addfcodes.o decode.o detok.o dictionary.o pcihdr.o printformats.o \
35+
stream.o ../shared/classcodes.o
3036

31-
include $(TOPDIR)/Rules.make
37+
all: .dependencies $(PROGRAM)
3238

39+
$(PROGRAM): $(OBJS)
40+
$(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
41+
$(STRIP) -s $(PROGRAM)
3342

34-
CC = gcc
35-
CFLAGS = -O2 -Wall -ansi
43+
clean:
44+
rm -f $(OBJS) *~
3645

37-
# For debugging the indentation code of detok, define DEBUG_INDENT
38-
#CFLAGS := $(CFLAGS) -DDEBUG_INDENT
46+
distclean: clean
47+
rm -f $(PROGRAM) .dependencies
48+
49+
.dependencies: *.c
50+
@$(CC) $(CFLAGS) $(INCLUDES) -MM *.c > .dependencies
3951

40-
all: main detok
41-
@echo -e "\nOpenBIOS detokenizer detok build finished\n"
52+
.PHONY: all clean distclean
4253

43-
main:
44-
@echo -e "\nWelcome to the OpenBIOS detokenizer.."
45-
@test -r $(BUILDDIR) || ( mkdir -p $(BUILDDIR); \
46-
echo -e "\nCreating build directory $(BUILDDIR)" )
47-
48-
detok: detok.o dictionary.o decode.o stream.o
49-
@echo -en "\nLinking fcode detokenizer detok..."
50-
@cd $(BUILDDIR) && ( $(CC) $(CFLAGS) $^ -o $@; strip detok )
51-
@echo -e "\tok"
52-
53-
clean:
54-
@test ! -d $(BUILDDIR) && \
55-
echo "Architecture $(ARCH) is already clean." || \
56-
( \
57-
echo "Cleaning up architecture $(ARCH)"; \
58-
rm -rf $(BUILDDIR) \
59-
rm forth.dict.core \
60-
)
54+
-include .dependencies
6155

62-
distclean: clean
63-
rm -f detok
56+
.c.o:
57+
$(CC) -c $(CFLAGS) $(INCLUDES) $< -o $@
6458

65-
detok.o: detok.h stream.h detok.c
66-
stream.o: detok.h stream.c
67-
decode.o: detok.h stream.h decode.c Makefile
68-
dictionary.o: detok.h dictionary.c

detok/Rules.make

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)