Skip to content

Commit

Permalink
fix read netlist
Browse files Browse the repository at this point in the history
  • Loading branch information
esonghori committed Sep 30, 2015
1 parent 048e521 commit 1ec07e0
Show file tree
Hide file tree
Showing 7 changed files with 392 additions and 348 deletions.
6 changes: 2 additions & 4 deletions eval_netlist/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ OBJECT := $(SRC:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o)

rm = rm --f

.PHONY: all prep release clean
.PHONY: all prep clean

all: release

release: prep $(TINYGARBLE)
all: prep $(TINYGARBLE)

$(TINYGARBLE): $(OBJECT)
$(CC) $(OBJECT) -o $(TINYGARBLE) $(CFLAGS) $(LIBS)
Expand Down
62 changes: 23 additions & 39 deletions read_netlist/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,55 +5,39 @@
# JustGarble
# ***********************************************

OBJDIR = obj
RELDIR = bin
DEBDIR = debug
RELOBJDIR = $(RELDIR)/$(OBJDIR)
DEBOBJDIR = $(DEBDIR)/$(OBJDIR)

IDIR = include
CC = g++
CFLAGS = -std=c++11 -maes -msse4 -Wno-unused-result -march=native $(USER_FLAGS)
LIBS = -lm -lrt -lpthread -lboost_program_options

CC=g++
CFLAGS= -std=c++11 -lm -lrt -lpthread -maes -msse4 -Wno-unused-result -march=native -I$(IDIR)
DBGCFLAGS = -g -O0 -DDEBUG
RELCFLAGS = -O3 -DNDEBUG
ifeq ($(DEBUG),true)
CFLAGS += -g -O0 -DDEBUG
else
CFLAGS += -O3 -DNDEBUG
endif

SOURCES := $(wildcard *.cpp)
RELOBJECT := $(SOURCES:$/%.cpp=$(RELOBJDIR)/%.o)
DEBOBJECT := $(SOURCES:$/%.cpp=$(DEBOBJDIR)/%.o)
SRCDIR = .
BINDIR = bin
OBJDIR = $(BINDIR)/obj
READNETLIST = $(BINDIR)/read_netlist.out
SRC := $(wildcard $(SRCDIR)/*.cpp)
OBJECT := $(SRC:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o)


READNETLIST = readNetlist
rm = rm --f

.PHONY: all release debug check_msgpack prep clean

all: release debug

release: prep $(RELDIR)/$(READNETLIST).out
debug: prep $(DEBDIR)/$(READNETLIST).out

##release
$(RELDIR)/$(READNETLIST).out: $(RELOBJECT)
$(CC) $(RELOBJECT) -o $(RELDIR)/$(READNETLIST).out $(LIBS) $(CFLAGS) $(RELCFLAGS)
.PHONY: all prep clean

$(RELOBJECT): $(RELOBJDIR)/%.o : %.cpp
$(CC) -c $< -o $@ $(LIBS) $(CFLAGS) $(RELCFLAGS)
all: prep $(READNETLIST)

##debug
$(DEBDIR)/$(READNETLIST).out: $(DEBOBJECT)
$(CC) $(DEBOBJECT) -o $(DEBDIR)/$(READNETLIST).out $(LIBS) $(CFLAGS) $(DBGCFLAGS)
$(READNETLIST): $(OBJECT)
$(CC) $(OBJECT) -o $(READNETLIST) $(CFLAGS) $(LIBS)

$(DEBOBJECT): $(DEBOBJDIR)/%.o : %.cpp
$(CC) -c $< -o $@ $(LIBS) $(CFLAGS) $(DBGCFLAGS)
$(OBJECT): $(OBJDIR)/%.o : $(SRCDIR)/%.cpp
$(CC) -c $< -o $@ $(CFLAGS)

prep:
@mkdir -p $(RELDIR) $(DEBDIR)
@mkdir -p $(RELDIR)/$(OBJDIR)
@mkdir -p $(DEBDIR)/$(OBJDIR)
@mkdir -p $(BINDIR)
@mkdir -p $(OBJDIR)

clean:
@$(rm) $(RELOBJECT)
@$(rm) $(RELDIR)/$(READNETLIST).out
@$(rm) $(DEBOBJECT)
@$(rm) $(DEBDIR)/$(READNETLIST).out
@$(rm) -r $(BINDIR)
Loading

0 comments on commit 1ec07e0

Please sign in to comment.