Advertisement
Guest User

Untitled

a guest
Jan 12th, 2012
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. TOOLS = syscon
  2. COMMON = tools.o aes.o sha1.o ec.o bn.o
  3. DEPS = Makefile tools.h types.h
  4. OSNAME = $(shell uname -s)
  5.  
  6. ifeq ($(findstring MINGW, $(OSNAME)), MINGW)
  7. COMMON += mingw_mmap.o
  8. endif
  9.  
  10. CC = gcc
  11. CFLAGS = -g -O2 -Wall -W
  12. LDLIBS = -lz
  13.  
  14. # Darwin's MacPorts Default Path
  15. ifeq ($(shell test -e /opt/local/include/gmp.h; echo $$?),0)
  16. CFLAGS += -I/opt/local/include
  17. LDLIBS += -L/opt/local/lib
  18. endif
  19.  
  20. OBJS = $(COMMON) $(addsuffix .o, $(TOOLS))
  21.  
  22. all: $(TOOLS)
  23.  
  24. $(TOOLS): %: %.o $(COMMON) $(DEPS)
  25. $(CC) $(CFLAGS) -o $@ $< $(COMMON) $(LDLIBS)
  26.  
  27. scekrit: LDLIBS += -lgmp
  28.  
  29. $(OBJS): %.o: %.c $(DEPS)
  30. $(CC) $(CFLAGS) -c -o $@ $<
  31.  
  32. clean:
  33. -rm -f $(OBJS) $(TOOLS) *.exe
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement