Set CXX standard per parser and fix Norg

This commit is contained in:
Stephan Seitz 2021-09-09 22:48:57 +02:00
parent 9419107d86
commit bb33aea03c
4 changed files with 14 additions and 7 deletions

View file

@ -3,14 +3,16 @@
# Stephan Seitz, 2021-09-09 21:36
#
CC?=cc
CXX_STANDARD?=c++14
C_STANDARD?=c99
all: parser.so
parser.o: src/parser.c
$(CC) -c src/parser.c -std=c99 -fPIC -I./src
$(CC) -c src/parser.c -std=$(C_STANDARD) -fPIC -I./src
scanner.o: src/scanner.cc
$(CC) -c src/scanner.cc -std=c++17 -fPIC -I./src
$(CC) -c src/scanner.cc -std=$(CXX_STANDARD) -fPIC -I./src
parser.so: parser.o scanner.o
$(CC) parser.o scanner.o -o parser.so -shared -Os -lstdc++