Makefile 862 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Edit these to suit
  2. #
  3. # Oh yeah, and please read the README too.
  4. SSL_HOMEDIR=../..
  5. SSL_INCLUDEDIR=$(SSL_HOMEDIR)/include
  6. SSL_LIBDIR=$(SSL_HOMEDIR)
  7. RM=rm -f
  8. CC=gcc
  9. DEBUG_FLAGS=-g -ggdb3 -Wall -Wshadow
  10. INCLUDE_FLAGS=-I$(SSL_INCLUDEDIR)
  11. CFLAGS=$(DEBUG_FLAGS) $(INCLUDE_FLAGS) -DNO_CONFIG_H
  12. COMPILE=$(CC) $(CFLAGS) -c
  13. # Edit, particularly the "-ldl" if not building with "dlfcn" support
  14. LINK_FLAGS=-L$(SSL_LIBDIR) -lssl -lcrypto -ldl
  15. SRCS=buffer.c cb.c ip.c sm.c tunala.c breakage.c
  16. OBJS=buffer.o cb.o ip.o sm.o tunala.o breakage.o
  17. TARGETS=tunala
  18. default: $(TARGETS)
  19. clean:
  20. $(RM) $(OBJS) $(TARGETS) *.bak core
  21. .c.o:
  22. $(COMPILE) $<
  23. tunala: $(OBJS)
  24. $(CC) -o tunala $(OBJS) $(LINK_FLAGS)
  25. # Extra dependencies, should really use makedepend
  26. buffer.o: buffer.c tunala.h
  27. cb.o: cb.c tunala.h
  28. ip.o: ip.c tunala.h
  29. sm.o: sm.c tunala.h
  30. tunala.o: tunala.c tunala.h