Skip to content

Commit

Permalink
Merge pull request #1 from smuzaffar/main
Browse files Browse the repository at this point in the history
improve buidl system; added all and install targets
  • Loading branch information
aloeliger authored Feb 10, 2023
2 parents b91e03f + a599ccb commit 62cb5a8
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
CPP_STANDARD := c++17
CXXFLAGS := -O3 -fPIC -std=$(CPP_STANDARD)
ifeq ($(strip $(PREFIX)),)
PREFIX:=.
endif

.PHONY: clean
.DEFAULT_GOAL := all
.PHONY: clean all install

emulator_interface.so: emulator.cc emulator.h
EMULATOR_LIB:=libemulator_interface.so
all: $(EMULATOR_LIB)
@echo All done

install: all
@rm -rf $(PREFIX)/include $(PREFIX)/lib64
@mkdir -p $(PREFIX)/include $(PREFIX)/lib64
cp emulator.h $(PREFIX)/include/
cp -r ap_types $(PREFIX)/include/
cp $(EMULATOR_LIB) $(PREFIX)/lib64

$(EMULATOR_LIB): emulator.cc emulator.h
$(CXX) $(CXXFLAGS) -shared $^ -o $@

clean:
rm emulator_interface.so
rm $(EMULATOR_LIB)

0 comments on commit 62cb5a8

Please sign in to comment.