1# ***************************************************************************** 2# * Copyright (c) 2004, 2008 IBM Corporation 3# * All rights reserved. 4# * This program and the accompanying materials 5# * are made available under the terms of the BSD License 6# * which accompanies this distribution, and is available at 7# * http://www.opensource.org/licenses/bsd-license.php 8# * 9# * Contributors: 10# * IBM Corporation - initial implementation 11# ****************************************************************************/ 12 13TOPCMNDIR ?= ../.. 14 15include $(TOPCMNDIR)/make.rules 16 17ASFLAGS = $(FLAG) $(RELEASE) $(CPUARCHDEF) -Wa,-mregnames 18CPPFLAGS = -I../libc/include $(CPUARCHDEF) -I$(INCLBRDDIR) -I. -I../../include 19LDFLAGS = -nostdlib 20 21TARGET = ../libbootmsg.a 22 23 24all: $(TARGET) 25 26ifeq ($(CPUARCH),cbea) 27SRCS = 28SRCSS = bootmsg_lvl.S 29else 30ifeq ($(CPUARCH),ppc970) 31SRCS = 32SRCSS = bootmsg_lvl.S 33else 34ifeq ($(CPUARCH),p5) 35SRCS = 36SRCSS = bootmsg_lvl.S 37else 38ifeq ($(CPUARCH),ppcp7) 39SRCS = 40SRCSS = bootmsg_lvl.S 41else 42SRCS = bootmsg.c 43SRCSS = 44endif 45endif 46endif 47endif 48 49OBJS = $(SRCS:%.c=%.o) $(SRCSS:%.S=%.o) 50 51$(TARGET): $(OBJS) 52 $(AR) -rc $@ $(OBJS) 53 $(RANLIB) $@ 54 55%.o: %.S 56 $(CC) $(CPPFLAGS) $(ASFLAGS) -c $< -o $@ 57 58clean: 59 $(RM) $(TARGET) $(OBJS) 60 61distclean: clean 62 $(RM) Makefile.dep 63 64 65# Rules for creating the dependency file: 66depend: 67 $(RM) Makefile.dep 68 $(MAKE) Makefile.dep 69 70Makefile.dep: Makefile 71 $(CC) -MM $(CPPFLAGS) $(CFLAGS) $(SRCS) $(SRCSS) > Makefile.dep 72 73# Include dependency file if available: 74-include Makefile.dep 75 76