
TARGET	= sha1
ifeq ($(findstring Windows_NT,$(OS)),Windows_NT)
BINEXT	= .exe
endif

#DEFINES	= -DTEST
DEFINES	= -DAPP
DEFINES	+= -DHAVE_STDINT_H
CFLAGS	= -Wall -O2 $(DEFINES)
LDFLAGS	= -s

SOURCES	= $(wildcard *.c)
OBJECTS	= $(patsubst %.c,%.o,$(SOURCES))


all: $(TARGET)$(BINEXT)

$(TARGET)$(BINEXT): $(OBJECTS)
	$(CC) $(LDFLAGS) -o $@ $^

clean:
	$(RM) $(TARGET)$(BINEXT) *.o

