## This file is part of the libpayload project.
##
## Copyright (C) 2008 Advanced Micro Devices, Inc.
+## Copyright (C) 2008 coresystems GmbH
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions
## SUCH DAMAGE.
##
-TARGETS-y += libc/malloc.o libc/printf.o libc/console.o libc/string.o
-TARGETS-y += libc/memory.o libc/ctype.o
-TARGETS-y += libc/ipchecksum.o
+libc-$(CONFIG_LIBC) += malloc.c printf.c console.c string.c
+libc-$(CONFIG_LIBC) += memory.c ctype.c ipchecksum.c lib.c
+libc-$(CONFIG_LIBC) += rand.c time.c exec.c
+libc-$(CONFIG_LIBC) += readline.c getopt_long.c sysinfo.c
+libc-$(CONFIG_LIBC) += args.c strings.c
+
+# should be moved to coreboot directory
+libc-$(CONFIG_LAR) += lar.c
+#libc-$(CONFIG_CBFS) += cbfs.c