summaryrefslogtreecommitdiffstats
path: root/mingw32
blob: b811a6c307880da231a784253182fccb9beecf6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
PROG = hashtbl
OBJS = $(PROG).o hashfuncs.o
CC = gcc
DBGFLAGS = -g -O0
ifdef DEBUG
    CFLAGS = $(DBGFLAGS) -Wall -std=c99
else
    CFLAGS = -Wall -std=c99 -O2 -march=native -mtune=native
endif
LDFLAGS = -lm

$(PROG): $(OBJS)
	$(CC) -o $(PROG) $(OBJS) $(LDFLAGS)

$(PROG).o: $(PROG).c hashtbl.h hashfuncs.h
	$(CC) -c $(CFLAGS) $(PROG).c

hashfuncs.o: hashfuncs.c hashfuncs.h
	$(CC) -c $(CFLAGS) hashfuncs.c

.PHONY: clean

clean:
	rm -f *.o ./$(PROG).exe