diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD index bacbafa93..b7469afe5 100644 --- a/configure/RULES_BUILD +++ b/configure/RULES_BUILD @@ -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 diff --git a/configure/os/CONFIG.Common.RTEMS b/configure/os/CONFIG.Common.RTEMS index 73fe9f498..0e3d1ca99 100644 --- a/configure/os/CONFIG.Common.RTEMS +++ b/configure/os/CONFIG.Common.RTEMS @@ -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 diff --git a/configure/os/CONFIG.Common.vxWorksCommon b/configure/os/CONFIG.Common.vxWorksCommon index 5a22a3b71..54b894f02 100644 --- a/configure/os/CONFIG.Common.vxWorksCommon +++ b/configure/os/CONFIG.Common.vxWorksCommon @@ -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 diff --git a/configure/os/CONFIG.linux-x86.Common b/configure/os/CONFIG.linux-x86.Common index 644abf181..91185939c 100644 --- a/configure/os/CONFIG.linux-x86.Common +++ b/configure/os/CONFIG.linux-x86.Common @@ -11,4 +11,3 @@ include $(CONFIG)/os/CONFIG.UnixCommon.Common WIND_HOST_TYPE = i386-linux2 - diff --git a/configure/os/CONFIG.linux-x86.linux-x86 b/configure/os/CONFIG.linux-x86.linux-x86 index 453e5a6eb..50cb166fe 100644 --- a/configure/os/CONFIG.linux-x86.linux-x86 +++ b/configure/os/CONFIG.linux-x86.linux-x86 @@ -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 diff --git a/configure/os/CONFIG.solaris-sparc.solaris-sparc b/configure/os/CONFIG.solaris-sparc.solaris-sparc index 6d6c60f9a..552f05606 100644 --- a/configure/os/CONFIG.solaris-sparc.solaris-sparc +++ b/configure/os/CONFIG.solaris-sparc.solaris-sparc @@ -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 diff --git a/configure/os/CONFIG.win32-x86.Common b/configure/os/CONFIG.win32-x86.Common index 4581c4452..34e4e9a3d 100644 --- a/configure/os/CONFIG.win32-x86.Common +++ b/configure/os/CONFIG.win32-x86.Common @@ -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