summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--mingw3224
2 files changed, 25 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 3e20c8c..87baee7 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ $(PROG): $(OBJS)
$(PROG).o: $(PROG).c hashtbl.h hashfuncs.h
$(CC) -c $(CFLAGS) $(PROG).c
-
+
hashfuncs.o: hashfuncs.c hashfuncs.h
$(CC) -c $(CFLAGS) hashfuncs.c
diff --git a/mingw32 b/mingw32
new file mode 100644
index 0000000..b811a6c
--- /dev/null
+++ b/mingw32
@@ -0,0 +1,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