view example/fft/Makefile.macosx @ 1717:5d68a55d5561 draft

fix profile
author Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
date Tue, 15 Oct 2013 17:29:37 +0900
parents 8e0305989829
children 2e8931baef7f
line wrap: on
line source

include ./Makefile.def


SRCS_TMP = $(wildcard *.cc)
SRCS_EXCLUDE = # 除外するファイルを書く
SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP))
OBJS = $(SRCS:.cc=.o)

#GPU_TASK_DIR = gpu
TASK_DIR  = ppe
TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cc)
TASK_SRCS_EXCLUDE =
TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
TASK_OBJS = $(TASK_SRCS:.cc=.o)

CC      = clang++
CC += $(ABI)
# CFLAGS  = -g -Wall# -O9 #-DDEBUG

INCLUDE =  -I. -I.. -I${CERIUM}/include/TaskManager
LIBS = -L${CERIUM}/TaskManager -lFifoManager `sdl-config --libs`

.SUFFIXES: .cc .o

.cc.o:
	$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@

all: $(TARGET)

$(TARGET): $(OBJS) $(TASK_OBJS)
	$(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS)

link:
	$(CC) -o $(TARGET) $(OBJS) $(TASK_OBJS) $(LIBS)

hoge:
	cpus=0;./$(TARGET) -file lena512.pgm -cpu $$cpus
	cpus=1;./$(TARGET) -file lena512.pgm -cpu $$cpus
	cpus=2;./$(TARGET) -file lena512.pgm -cpu $$cpus
	cpus=3;./$(TARGET) -file lena512.pgm -cpu $$cpus
	cpus=4;./$(TARGET) -file lena512.pgm -cpu $$cpus
	cpus=5;./$(TARGET) -file lena512.pgm -cpu $$cpus
	cpus=6;./$(TARGET) -file lena512.pgm -cpu $$cpus
	cpus=7;./$(TARGET) -file lena512.pgm -cpu $$cpus
	cpus=8;./$(TARGET) -file lena512.pgm -cpu $$cpus
	cpus=9;./$(TARGET) -file lena512.pgm -cpu $$cpus
	cpus=10;./$(TARGET) -file lena512.pgm -cpu $$cpus
	cpus=11;./$(TARGET) -file lena512.pgm -cpu $$cpus
	cpus=12;./$(TARGET) -file lena512.pgm -cpu $$cpus
	cpus=13;./$(TARGET) -file lena512.pgm -cpu $$cpus
	cpus=14;./$(TARGET) -file lena512.pgm -cpu $$cpus
	cpus=15;./$(TARGET) -file lena512.pgm -cpu $$cpus
	cpus=16;./$(TARGET) -file lena512.pgm -cpu $$cpus

debug: $(TARGET)
	sudo gdb ./$(TARGET)

clean:
	rm -f $(TARGET) $(OBJS) $(TASK_OBJS)
	rm -f *~ \#*
	rm -f ppe/*~ ppe/\#*
	rm -f spe/*~ spe/\#*
	rm -f gpu/*~ gpu/\#*