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 # ****************************************************************************/
15 LIBCCMNDIR = $(shell pwd)
16 STRINGCMNDIR = $(LIBCCMNDIR)/string
17 CTYPECMNDIR = $(LIBCCMNDIR)/ctype
18 STDLIBCMNDIR = $(LIBCCMNDIR)/stdlib
19 STDIOCMNDIR = $(LIBCCMNDIR)/stdio
20 GETOPTCMNDIR = $(LIBCCMNDIR)/getopt
22 include $(TOPCMNDIR)/make.rules
25 CPPFLAGS = -I$(LIBCCMNDIR)/include
33 # Use the following target to build a native version of the lib
34 # (for example for debugging purposes):
36 $(MAKE) CROSS="" CC=$(HOSTCC) NATIVEBUILD=1
39 include $(STRINGCMNDIR)/Makefile.inc
40 include $(CTYPECMNDIR)/Makefile.inc
41 include $(STDLIBCMNDIR)/Makefile.inc
42 include $(STDIOCMNDIR)/Makefile.inc
43 include $(GETOPTCMNDIR)/Makefile.inc
45 OBJS = $(STRING_OBJS) $(CTYPE_OBJS) $(STDLIB_OBJS) $(STDIO_OBJS) $(GETOPT_OBJS)
47 ifneq ($(NATIVEBUILD),1)
48 # These parts of the libc use assembler, so they can only be compiled when
49 # we are _not_ building a native version.
59 $(RM) $(TARGET) $(OBJS)