Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Wslay - The WebSocket Library
  2. # Copyright (c) 2011, 2012 Tatsuhiro Tsujikawa
  3. # Permission is hereby granted, free of charge, to any person obtaining
  4. # a copy of this software and associated documentation files (the
  5. # "Software"), to deal in the Software without restriction, including
  6. # without limitation the rights to use, copy, modify, merge, publish,
  7. # distribute, sublicense, and/or sell copies of the Software, and to
  8. # permit persons to whom the Software is furnished to do so, subject to
  9. # the following conditions:
  10. # The above copyright notice and this permission notice shall be
  11. # included in all copies or substantial portions of the Software.
  12. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  13. # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  14. # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  15. # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  16. # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  17. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  18. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  19. CC = gcc
  20. CXX = g++
  21. CFLAGS = -g -O2 -I../lib/includes
  22. CXXFLAGS = $(CFLAGS)
  23. LDFLAGS = -L../lib/.libs
  24. LIBS = -lwslay -lnettle
  25. PROGRAMS = fork-echoserv echoserv testclient
  26. .PHONY: all
  27. all: $(PROGRAMS)
  28. fork-echoserv: fork-echoserv.c
  29. $(CC) $(CFLAGS) $(LDFLAGS) -o $@ fork-echoserv.c $(LIBS)
  30. echoserv: echoserv.cc
  31. $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ echoserv.cc $(LIBS)
  32. testclient: testclient.cc
  33. $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ testclient.cc $(LIBS)
  34. .PHONY: clean
  35. clean:
  36. rm -f *.o $(PROGRAMS)