Makefile 432 B

123456789101112131415161718192021222324252627282930
  1. SRC= ldap-auth.cpp \
  2. ldapReader.cpp
  3. OBJ= $(SRC:.cpp=.o)
  4. NAME= auth_ldap.so
  5. CXXFLAGS+=-O2 -I/usr/include/mysql/server -fPIC -DMYSQL_DYNAMIC_PLUGIN -std=c++11
  6. LDFLAGS= -lldap
  7. $(NAME): all
  8. all: $(OBJ) test
  9. $(CC) $(OBJ) -o $(NAME) -shared $(LDFLAGS)
  10. clean:
  11. $(RM) $(OBJ) test.o
  12. fclean: clean
  13. $(RM) $(NAME) test
  14. test: $(OBJ) test.o
  15. $(CXX) $(OBJ) test.o -O2 -o test $(LDFLAGS)
  16. re: fclean all
  17. .PHONY: all clean fclean re