MC3302_SDK_V1.1.9_202507281.../media/sample/modules/vgs/Makefile.linux

49 lines
1018 B
Makefile
Raw Permalink Normal View History

2025-11-11 04:08:31 +00:00
include ../../Makefile.param
MPI_LIBS := $(REL_LIB)/libmpi.a
# target source
TEST_SRC := vgs_test.c
TEST_OBJ := vgs_test.o
TEST_APP := vgs_test
PERM_SRC := vgs_performace.c
PERM_OBJ := vgs_performace.o
PERM_APP := vgs_performace
CHAN_SRC := vgs_chan.c
CHAN_OBJ := vgs_chan.o
CHAN_APP := vgs_chan
.PHONY : clean all
.c.o:
$(CC) -c $(CFLAGS) -o $@ $<
.cpp.o:
$(CC) -c $(CFLAGS) -o $@ $<
all: $(TEST_APP) $(PERM_APP) $(CHAN_APP)
$(TEST_APP): $(TEST_OBJ)
$(CC) -o $@ $(CFLAGS) $(TEST_OBJ) $(MPI_LIBS) -lpthread -lm -ldl
cp $(TEST_APP) $(REL_TEST)/
cp *.sh $(REL_TEST)/
@mkdir -p $(REL_TEST)/res/
cp ./res/* $(REL_TEST)/res/
$(PERM_APP): $(PERM_OBJ)
$(CC) -o $@ $(CFLAGS) $(PERM_OBJ) $(MPI_LIBS) -lpthread -lm -ldl
cp $(PERM_APP) $(REL_TEST)/
$(CHAN_APP): $(CHAN_OBJ)
$(CC) -o $@ $(CFLAGS) $(CHAN_OBJ) $(MPI_LIBS) -lpthread -lm -ldl
cp $(CHAN_APP) $(REL_TEST)/
clean:
@rm -f $(TEST_OBJ)
@rm -f $(TEST_APP)
@rm -f $(PERM_OBJ)
@rm -f $(PERM_APP)
@rm -f $(CHAN_OBJ)
@rm -f $(CHAN_APP)