summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKamil Kaminski <kamilkss@gmail.com>2011-01-17 21:14:35 -0600
committerKamil Kaminski <kamilkss@gmail.com>2011-01-17 21:14:35 -0600
commitef3ef8e7fb2f163d7c7c5946319b1a5fba650d35 (patch)
tree9fb3332493a46e69c0d963372957b935c297e3ff
parent921625b799fe9ed07e0d836408f2d0e35a67f5db (diff)
downloadhashtable-master.tar.gz
hashtable-master.tar.bz2
hashtable-master.zip
add mingw32 targetHEADmaster
-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