OSDN Git Service

f7d300d895f69b7d7dabd21d65c4ea02aaefb6ca
[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 TOOLDIR = ${OETMP}/sysroots/i686-linux/usr/armv7a/bin
19 STAGEDIR = ${OETMP}/sysroots/armv7a-angstrom-linux-gnueabi/usr
20
21 CC = ${TOOLDIR}/arm-angstrom-linux-gnueabi-gcc
22
23 # for DEBUG
24 #CFLAGS = -Wall -lm -lpthread -DDEBUG_FILE_MIN -DDEBUG_FILE_MIN_PERIOD=1
25
26 CFLAGS = -Wall -lm -lpthread
27
28 LIBDIR = ${STAGEDIR}/lib
29
30 INCDIR = ${STAGEDIR}/include      
31
32 TARGET = scilog
33
34 OBJS = scilog.o spi.o thread_rcv.o ring.o ad_ring.o thread_rec.o sts.o ad_file.o conf.o lcd.o thread_disp.o
35
36 HDRS            = mes_print.h debug_print.h spi.h my_thread.h ring.h ad_ring.h thread_rec.h sts.h ad_file.h conf.h lcd.h
37
38 ${TARGET} : $(OBJS) $(HDRS) 
39         ${CC} ${CFLAGS} ${OBJS} -L ${LIBDIR} -o ${TARGET}
40
41 #meas.o: meas.c 
42 #       ${CC} ${CFLAGS} -I ${INCDIR} -c meas.c  
43
44 clean:
45         rm -f ${TARGET} ${OBJS} *~