From 20e6db04571bc55cd70de6044199d3c742e00b73 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Thu, 24 Aug 2017 19:41:44 -0700 Subject: [PATCH] edit --- src/Makefile | 9 +++++++-- src/classlist.h | 7 +++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Makefile b/src/Makefile index c2d10b7..5adb178 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,9 +6,11 @@ OBJ_DIR = bin CPP_SOURCES := $(wildcard *.cc) $(wildcard AST/*.cc) $(wildcard ASTTransform/*.cc) $(wildcard ASTAnalyses/*.cc) $(wildcard Tuner/*.cc) $(wildcard Collections/*.cc) $(wildcard Backend/*.cc) $(wildcard Encoders/*.cc) +C_SOURCES := $(wildcard *.c) $(wildcard AST/*.c) $(wildcard ASTTransform/*.c) $(wildcard ASTAnalyses/*.c) $(wildcard Tuner/*.c) $(wildcard Collections/*.c) $(wildcard Backend/*.c) $(wildcard Encoders/*.c) + HEADERS := $(wildcard *.h) $(wildcard AST/*.h) $(wildcard ASTTransform/*.h) $(wildcard ASTAnalyses/*.h) $(wildcard Tuner/*.h) $(wildcard Collections/*.h) $(wildcard Backend/*.h) $(wildcard Encoders/*.h) -OBJECTS := $(CPP_SOURCES:%.cc=$(OBJ_DIR)/%.o) +OBJECTS := $(CPP_SOURCES:%.cc=$(OBJ_DIR)/%.o) $(C_SOURCES:%.c=$(OBJ_DIR)/%.o) CFLAGS := -Wall -g -O0 CFLAGS += -IAST -IASTTransform -IASTAnalyses -ICollections -IBackend -I. -IEncoders -ITuner @@ -48,9 +50,12 @@ docs: $(C_SOURCES) $(HEADERS) doxygen ${OBJ_DIR}/$(LIB_SO): $(OBJECTS) - $(CC) -g $(SHARED) -o ${OBJ_DIR}/$(LIB_SO) $+ $(LDFLAGS) + $(CXX) -g $(SHARED) -o ${OBJ_DIR}/$(LIB_SO) $+ $(LDFLAGS) ${OBJ_DIR}/%.o: %.cc + $(CXX) -fPIC -c $< -o $@ $(CFLAGS) -Wno-unused-variable + +${OBJ_DIR}/%.o: %.c $(CC) -fPIC -c $< -o $@ $(CFLAGS) -Wno-unused-variable -include $(OBJECTS:%=$OBJ_DIR/.%.d) diff --git a/src/classlist.h b/src/classlist.h index cd0cc82..38aee74 100644 --- a/src/classlist.h +++ b/src/classlist.h @@ -26,10 +26,6 @@ class BooleanVar; class BooleanLogic; class BooleanPredicate; class ASTNode; - -struct IncrementalSolver; -typedef struct IncrementalSolver IncrementalSolver; - class Set; typedef class Set MutableSet; @@ -48,6 +44,9 @@ class PredicateOperator; class Table; class Order; +struct IncrementalSolver; +typedef struct IncrementalSolver IncrementalSolver; + struct OrderPair; typedef struct OrderPair OrderPair; -- 2.34.1