Added support for compiling user C files
This commit is contained in:
parent
fe67257c97
commit
efd1f1cdfd
1 changed files with 6 additions and 2 deletions
|
|
@ -62,9 +62,10 @@ MEM_C = mem.c mem_model.c
|
|||
USER_C = VUserMain0.cpp
|
||||
USER_INCL =
|
||||
|
||||
USER_C_BASE = $(notdir ${USER_C})
|
||||
USER_CPP_BASE = $(notdir $(filter %cpp, ${USER_C}))
|
||||
USER_C_BASE = $(notdir $(filter %c, ${USER_C}))
|
||||
|
||||
VOBJS = ${addprefix ${VOBJDIR}/, ${USER_C_BASE:%.cpp=%.o} ${VPROC_C:%.c=%.o} ${MEM_C:%.c=%.o}}
|
||||
VOBJS = ${addprefix ${VOBJDIR}/, ${USER_C_BASE:%.c=%.o} ${USER_CPP_BASE:%.cpp=%.o} ${VPROC_C:%.c=%.o} ${MEM_C:%.c=%.o}}
|
||||
|
||||
# Generated PLI C library
|
||||
VPROC_PLI = ${TESTDIR}/VProc.so
|
||||
|
|
@ -104,6 +105,9 @@ ${VOBJDIR}/%.o: ${SRCDIR}/%.c
|
|||
|
||||
${VOBJDIR}/%.o: ${USRCDIR}/%.cpp ${USRCDIR}/*.h ${EXTINCLDIR}/*.h ${COMMONTESTSDIR}/*.h ${COMMONUTILSDIR}/*.h
|
||||
@${C++} ${CPPSTD} -Wno-write-strings -c ${CFLAGS} $< -o $@
|
||||
|
||||
${VOBJDIR}/%.o: ${USRCDIR}/%.c ${USRCDIR}/*.h ${EXTINCLDIR}/*.h ${COMMONTESTSDIR}/*.h ${COMMONUTILSDIR}/*.h
|
||||
@${CC} -Wno-write-strings -c ${CFLAGS} $< -o $@
|
||||
|
||||
${VOBJDIR}/%.o: ${MEMMODELDIR}/%.c ${MEMMODELDIR}/*.h
|
||||
@${CC} -c ${CFLAGS} $< -o $@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue