openfoam/wmake/rules/General/flex
Mark Olesen eaa65913f4 CONFIG: combine flex/flex++ rules (minor cleanup)
- generate .cc (instead of .C) intermediate files, consistent with how
  we manage other generated code and makes them less case sensitive
2025-03-19 12:10:12 +01:00

23 lines
821 B
Plaintext

#------------------------------------------------------------------------------
SUFFIXES += .L .l .ll
# Regular flex, compile with C
ltoo = $E $(call QUIET_MESSAGE,flex,$(<F)) \
flex -f -o $(@D)/$(<F).c $< && \
$(WM_SCHEDULER) $(cc) $(cFLAGS) -c $(@D)/$(<F).c -o $@
## # Regular flex, compile with C++
## ll-cctoo = $E $(call QUIET_MESSAGE,flex,$(<F)) \
## flex -f -o $(@D)/$(<F).cc $< && \
## $(WM_SCHEDULER) $(CC) $(c++FLAGS) $(c++LESSWARN) -c $(@D)/$(<F).cc -o $@
# C++-aware flex, compile with C++
lltoo = $E $(call QUIET_MESSAGE,flex++,$(<F)) \
flex -+ -f -o $(@D)/$(<F).cc $< && \
$(WM_SCHEDULER) $(CC) $(c++FLAGS) $(c++LESSWARN) -c $(@D)/$(<F).cc -o $@
# C++-aware flex, compile with C++
Ltoo = $(lltoo)
#------------------------------------------------------------------------------