Since all systems other than vxWorks use a C++ constructor to register sequencer

programs and commands, use C++ to compile the output of SNC.  The commands to
use C in configure/os/CONFIG.Common.vxWorksCommon are commented out for now.
If enough people have problems using C++ to compile their SNC programs the
commands may have to be uncommented.
This commit is contained in:
W. Eric Norum
2001-01-14 22:15:40 +00:00
parent 951db45c95
commit 6c1be6f025
7 changed files with 32 additions and 26 deletions

View File

@@ -227,20 +227,6 @@ endif
$(MV) lex.yy.c $@
#state notation language rule
%.c: ../%.st
@echo "preprocessing $*.st"
@$(RM) $*.i
$(CPP) $(CPPSNCFLAGS) $< > $*.i
@echo "converting $*.i"
@$(RM) $@
$(SNC) $(TARGET_SNCFLAGS) $(SNCFLAGS) $*.i -o $@
%.c: %.stt
@echo "converting $<
ln -s $< $*.st
$(SNC) $(TARGET_SNCFLAGS) $(SNCFLAGS) $*.st -o $@
@$(RM) $*.st
%.cpp: ../%.st
@echo "preprocessing $*.st"
@$(RM) $*.i

View File

@@ -70,7 +70,6 @@ OP_SYS_LDFLAGS = $(CPU_CFLAGS) -u Init -lCom \
$(PROJECT_RELEASE)/lib/no-part.rel \
$(PROJECT_RELEASE)/lib/no-signal.rel \
$(PROJECT_RELEASE)/lib/no-rtmon.rel
CPPSNCFLAGS += -x c
#--------------------------------------------------
# c++ exceptions, YES or NO
@@ -98,13 +97,6 @@ GCC_CONFORM_CFLAGS_STRICT =
G++_CONFORM_CFLAGS_STRICT =
#--------------------------------------------------
# RTEMS uses C++ constructors to register commands/programs (snc +i option)
%.o: ../%.st
@echo "preprocessing $*.st"
@$(RM) $*.i
$(CPP) $(CPPSNCFLAGS) $< > $*.i
@echo "converting $*.i"
@$(RM) $*.c
$(SNC) +i $(TARGET_SNCFLAGS) $(SNCFLAGS) $*.i
@$(RM) $@
$(COMPILE.cpp) -x c++ -Wno-deprecated $*.c
# Use C++ constructors to register commands/programs (snc +i option)
CPPSNCFLAGS += -x c
TARGET_SNCFLAGS += +i

View File

@@ -95,6 +95,23 @@ OSITHREAD_USE_DEFAULT_STACK = NO
# Link definitions
LINK.cpp = $(GCC_LD) -o $@ $(LDFLAGS) $(PROD_LD_OBJS) $(PROD_LD_RES) $(LDLIBS)
#--------------------------------------------------
# Uncomment these lines to, use C to compile SNC output -- all other systems use C++
##%.c: ../%.st
## @echo "preprocessing $*.st"
## @$(RM) $*.i
## $(CPP) $(CPPSNCFLAGS) $< > $*.i
## @echo "converting $*.i"
## @$(RM) $@
## $(SNC) $(TARGET_SNCFLAGS) $(SNCFLAGS) $*.i -o $@
##
##%.c: %.stt
## @echo "converting $<
## ln -s $< $*.st
## $(SNC) $(TARGET_SNCFLAGS) $(SNCFLAGS) $*.st -o $@
## @$(RM) $*.st
CPPSNCFLAGS += -x c
#--------------------------------------------------
# Allow site overrides
-include $(CONFIG)/os/CONFIG_SITE.Common.vxWorksCommon

View File

@@ -11,4 +11,3 @@
include $(CONFIG)/os/CONFIG.UnixCommon.Common
WIND_HOST_TYPE = i386-linux2

View File

@@ -35,3 +35,7 @@ ARCH_DEP_CPPFLAGS += -D_X86_ -Dlinux
ARCH_DEP_LDFLAGS =
ARCH_DEP_LDLIBS = -lpthread -lreadline -lcurses -lrt
# Use C++ constructors to register commands/programs (snc +i option)
CPPSNCFLAGS += -x c
TARGET_SNCFLAGS += +i

View File

@@ -62,3 +62,7 @@ RANLIB =
# required by sun's C++ compiler
AR = $(CCC) -xar -o
#--------------------------------------------------
# Use C++ constructors to register commands/programs (snc +i option)
CPPSNCFLAGS += -x c
TARGET_SNCFLAGS += +i

View File

@@ -20,3 +20,7 @@ OSITHREAD_USE_DEFAULT_STACK = NO
HOSTEXE=.exe
#--------------------------------------------------
# Use C++ constructors to register commands/programs (snc +i option)
CPPSNCFLAGS += -x c
TARGET_SNCFLAGS += +i