You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
523 B
33 lines
523 B
4 years ago
|
SYS := $(shell $(CXX) -dumpmachine)
|
||
|
CXX = g++
|
||
|
|
||
|
SYG_SRC = sygcpp.cpp
|
||
|
SYGCPP = sygcpp
|
||
|
|
||
|
LDFLAGS = -O3 -s
|
||
|
LDLIBS = -lcrypto -lpthread
|
||
|
|
||
|
SYG_OBJS += $(patsubst %.cpp,obj/%.o,$(SYG_SRC))
|
||
|
|
||
|
ifneq (, $(findstring mingw, $(SYS))$(findstring cygwin, $(SYS)))
|
||
|
include Makefile.mingw
|
||
|
endif
|
||
|
|
||
|
all: mk_obj_dir $(SYGCPP)
|
||
|
|
||
|
mk_obj_dir:
|
||
|
@mkdir -p obj/windows
|
||
|
|
||
|
clean:
|
||
|
$(RM) -r obj $(SYGCPP)
|
||
|
|
||
|
obj/%.o: %.cpp
|
||
|
$(CXX) -c -o $@ $<
|
||
|
|
||
|
$(SYGCPP): $(SYG_OBJS)
|
||
|
$(CXX) -o $@ $^ $(LDFLAGS) $(LDLIBS)
|
||
|
|
||
|
.PHONY: all
|
||
|
.PHONY: clean
|
||
|
.PHONY: mk_obj_dir
|