[Tinyos-beta-commits] CVS: tinyos-1.x/beta/platform/pxa27x/lib Makefile, 1.1, 1.2

Lama Nachman lnachman at users.sourceforge.net
Tue Oct 18 14:30:15 PDT 2005


Update of /cvsroot/tinyos/tinyos-1.x/beta/platform/pxa27x/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4095

Modified Files:
	Makefile 
Log Message:


Index: Makefile
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/pxa27x/lib/Makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Makefile	6 Sep 2005 18:20:16 -0000	1.1
--- Makefile	18 Oct 2005 21:30:13 -0000	1.2
***************
*** 1,8 ****
  #variable definitions
! SRCS = profile.c queue.c
! HDRS = profile.h queue.h
! CFLAGS = -g -O3
  CC = xscale-elf-gcc
  
- pxa27xlib.o: $(SRCS) $(HDRS)
- 	$(CC) $(CFLAGS) $(SRCS) -c
\ No newline at end of file
--- 1,45 ----
  #variable definitions
! SRCS = $(call find-source-files,".")
! INCLUDE_DIRS = $(TOSDIR)/platform/pxa27x
! 
  CC = xscale-elf-gcc
+ CFLAGS = -g -O3 -I$(INCLUDE_DIRS)
+ 
+ AS = xscale-elf-as
+ ASFLAGS = -mcpu=iwmmxt -mfpu=softfpa
+ 
+ AR = xscale-elf-ar 
+ ARFLAGS = rvs
+ INTEL_FILES = c:/imote2/srcs
+ 
+ #function to find subdirectories that contains source
+ # $(find-source-dirs, base-directory-to-search)
+ define find-source-dirs
+ $(sort $(dir $(shell find -L $1 -name "*.[c,s]")))
+ endef
+ 
+ #function to find subdirectories that contains source
+ # $(find-source-dirs, base-directory-to-search)
+ define find-source-files
+ $(sort $(subst .s,.o,$(subst .c,.o,$(shell find -L $1 -name "*.[c,s]"))))
+ endef
+ 
+ #function to determin if a directory exists
+ # $(does-dir-exist, dir)
+ define does-dir-exist
+ $(findstring, "No such file or directory",$(shell find $1))
+ endef
+ 
+ 
+ source-dirs = $(call find-source-dirs,".")
+ 
+ #source-dirs = $(findstring, "No such file or directory",$(shell find $(INTEL_FILES))
+ 
+ #always make the library for debugging
+ #.PHONY: libimote2.a
+ 
+ libimote2.a: $(SRCS)
+ 	$(AR) $(ARFLAGS) $@ $?
+ clean: 
+ 	$(foreach i,$(source-dirs),cd $(i); rm -f *.[o,a]; )
  



More information about the Tinyos-beta-commits mailing list