Makefile.linux 407 B

1234567891011121314151617181920212223242526272829
  1. CXX = g++
  2. SYG_SRC = sygcpp1.1.cpp
  3. SYGCPP = sygcpp
  4. LDFLAGS += -O3 -s
  5. LDLIBS += -static-libgcc -lcrypto -lpthread
  6. SYG_OBJS += $(patsubst %.cpp,obj/%.o,$(SYG_SRC))
  7. all: mk_obj_dir $(SYGCPP)
  8. mk_obj_dir:
  9. @mkdir -p obj
  10. clean:
  11. $(RM) -r obj $(SYGCPP)
  12. obj/%.o: %.cpp
  13. $(CXX) -c -o $@ $<
  14. $(SYGCPP): $(SYG_OBJS)
  15. $(CXX) -o $@ $^ $(LDFLAGS) $(LDLIBS)
  16. .PHONY: all
  17. .PHONY: clean
  18. .PHONY: mk_obj_dir