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
10 # * IBM Corporation - initial implementation
11 # ****************************************************************************/
13 include ../../make.rules
15 CFLAGS_COMLIB = -pedantic -std=gnu99 -O0
19 COMLIBDIR = $(LLFWCMNDIR)/clib
22 COMLIB_SRC_C = iolib.c
24 COMLIB_SRCS = $(COMLIB_SRC_ASM:%=$(COMLIBDIR)/%) \
25 $(COMLIB_SRC_C:%=$(COMLIBDIR)/%)
26 COMLIB_OBJ_ASM = $(COMLIB_SRC_ASM:%.S=%.o)
27 COMLIB_OBJ_C = $(COMLIB_SRC_C:%.c=%.o)
30 comlib.o: $(COMLIB_OBJ_C) $(COMLIB_OBJ_ASM)
31 $(LD) $(LDFLAGS) $^ -o $@ -r
33 %.o: $(LLFWCMNDIR)/clib/%.c
34 $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_COMLIB) -c $< -o $@
36 %.o: $(LLFWCMNDIR)/clib/%.S
37 $(CC) $(CPPFLAGS) $(ASFLAGS) $(ASFLAGS_COMLIB) -c $< -o $@
39 LLFW_CLEAN_TARGETS += clean_clib
42 rm -f $(COMLIB_OBJ_C) $(COMLIB_OBJ_ASM) comlib.o