2013-02-27 02:32:19 -06:00
|
|
|
|
|
|
|
CONFIG := clang-debug
|
|
|
|
# CONFIG := gcc-debug
|
|
|
|
# CONFIG := profile
|
|
|
|
# CONFIG := release
|
|
|
|
|
|
|
|
CC = clang
|
2024-02-25 10:23:56 -06:00
|
|
|
CXX = clang++
|
2013-02-27 02:32:19 -06:00
|
|
|
CXXFLAGS = -MD -Wall -Wextra -ggdb
|
2024-02-25 10:23:56 -06:00
|
|
|
LIBS = -lstdc++
|
2013-02-27 02:32:19 -06:00
|
|
|
|
|
|
|
ifeq ($(CONFIG),clang-debug)
|
|
|
|
CXXFLAGS += -std=c++11 -O0
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG),gcc-debug)
|
|
|
|
CC = gcc
|
2024-02-25 10:23:56 -06:00
|
|
|
CXX = g++
|
2013-02-27 02:32:19 -06:00
|
|
|
CXXFLAGS += -std=gnu++0x -O0
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG),profile)
|
|
|
|
CC = gcc
|
2024-02-25 10:23:56 -06:00
|
|
|
CXX = g++
|
2013-02-27 02:32:19 -06:00
|
|
|
CXXFLAGS += -std=gnu++0x -Os -DNDEBUG
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG),release)
|
|
|
|
CC = gcc
|
2024-02-25 10:23:56 -06:00
|
|
|
CXX = g++
|
2013-02-27 02:32:19 -06:00
|
|
|
CXXFLAGS += -std=gnu++0x -march=native -O3 -DNDEBUG
|
|
|
|
endif
|
|
|
|
|
|
|
|
all: demo scshell
|
|
|
|
|
|
|
|
demo: demo.o subcircuit.o
|
|
|
|
|
|
|
|
scshell: scshell.o subcircuit.o
|
|
|
|
|
|
|
|
test: scshell
|
|
|
|
./scshell < test_macc22.txt
|
2013-03-02 06:53:59 -06:00
|
|
|
./scshell < test_mine.txt
|
2013-02-27 02:32:19 -06:00
|
|
|
perl test_perm.pl | ./scshell
|
|
|
|
splrun test_shorts.spl | ./scshell
|
|
|
|
splrun test_large.spl | ./scshell
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f demo scshell *.o *.d
|
|
|
|
|
|
|
|
.PHONY: all test clean
|
|
|
|
|
|
|
|
-include *.d
|