Makefile 727 B

12345678910111213141516171819202122232425262728293031323334
  1. # Makefile for uClibc
  2. #
  3. # Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  4. #
  5. # Licensed under the GNU Library General Public License version 2 or later.
  6. # See the COPYING.LIB file in the toplevel for more information.
  7. TOPDIR=../../../
  8. include $(TOPDIR)Rules.mak
  9. CSRC := $(wildcard *.c)
  10. COBJ := $(patsubst %.c,%.o,$(CSRC))
  11. SSRC := $(wildcard *.S)
  12. SOBJ := $(patsubst %.S,%.o,$(SSRC))
  13. OBJS := $(COBJ) $(SOBJ)
  14. OBJ_LIST := ../../obj.string.$(TARGET_ARCH)
  15. all: $(OBJ_LIST)
  16. $(OBJ_LIST): $(OBJS)
  17. $(STRIPTOOL) -x -R .note -R .comment $^
  18. echo $(patsubst %, string/$(TARGET_ARCH)/%, $^) > $@
  19. $(COBJ): %.o : %.c
  20. $(CC) $(CFLAGS) -c $< -o $@
  21. $(SOBJ): %.o : %.S
  22. $(CC) $(ASFLAGS) -c $< -o $@
  23. clean:
  24. $(RM) *.o *~ core