OSDN Git Service

cbb33cbe40a90ec54ebd834e2c3ec94f42825d0e
[scilog/scilog.git] / Makefile
1 # Makefile for building with the OE cross tools 
2 #
3 # OVEROTOP is normally ${HOME}/overo-oe 
4 #
5 # OETMP is the same as TMPDIR as defined in ${OVEROTOP}/build/conf/site.conf
6 #
7
8 OETMP = ${OVEROTOP}/tmp
9
10 # There were some OE toolchain path changes recently
11    
12 # OE prior to around 30July2010 
13 # TOOLDIR = ${OETMP}/cross/armv7a/bin
14 # STAGEDIR = ${OETMP}/staging/armv7a-angstrom-linux-gnueabi/usr
15    
16 # OE after 30July2010
17 TOOLDIR = ${OETMP}/sysroots/`uname -m`-linux/usr/armv7a/bin
18 STAGEDIR = ${OETMP}/sysroots/armv7a-angstrom-linux-gnueabi/usr
19
20 CC = ${TOOLDIR}/arm-angstrom-linux-gnueabi-gcc
21
22 # for DEBUG
23 #CFLAGS = -Wall -lm -lpthread -DDEBUG_FILE_MIN -DDEBUG_FILE_MIN_PERIOD=1
24
25 CFLAGS = -Wall -lm -lpthread
26
27 LIBDIR = ${STAGEDIR}/lib
28
29 INCDIR = ${STAGEDIR}/include      
30
31 TARGET = scilog
32
33 OBJS = scilog.o spi.o thread_rcv.o
34
35 HDRS            = mes_print.h debug_print.h spi.h my_thread.h
36
37 ${TARGET} : $(OBJS) $(HDRS) 
38         ${CC} ${CFLAGS} ${OBJS} -L ${LIBDIR} -o ${TARGET}
39
40 #meas.o: meas.c 
41 #       ${CC} ${CFLAGS} -I ${INCDIR} -c meas.c  
42
43 clean:
44         rm -f ${TARGET} ${OBJS} *~