Commit 5d8c3adf authored by Yoann Pigné's avatar Yoann Pigné

MinGW32 make options

parent 558ab5a8
...@@ -18,6 +18,13 @@ CDBG = -g $(CWARN) -fno-inline ...@@ -18,6 +18,13 @@ CDBG = -g $(CWARN) -fno-inline
CFLAGS = -I$(INCDIR) -O3 CFLAGS = -I$(INCDIR) -O3
DFLAGS = -I$(INCDIR) -g $(CWARN) -fno-inline -DDEBUG=1 DFLAGS = -I$(INCDIR) -g $(CWARN) -fno-inline -DDEBUG=1
ifeq ($(shell uname),MINGW32_NT-6.1)
SOCKET_LIB = -lwsock32
else
SOCKET_LIB =
endif
CTAG = ctags CTAG = ctags
CTAGFILE = filelist CTAGFILE = filelist
# src, object and bin files # src, object and bin files
...@@ -38,14 +45,14 @@ OBJS = \ ...@@ -38,14 +45,14 @@ OBJS = \
all: $(OUT_BINARY) $(OUT_LIBRARY) all: $(OUT_BINARY) $(OUT_LIBRARY)
$(OUT_BINARY): $(OBJS) $(OUT_BINARY): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o $(OUT_BINARY) $(CC) $(CFLAGS) $(OBJS) -o $(OUT_BINARY) $(SOCKET_LIB)
$(OUT_LIBRARY): $(OBJS) $(OUT_LIBRARY): $(OBJS)
$(AR) $(ARFLAGS) $(OUT_LIBRARY) $(OBJS) $(AR) $(ARFLAGS) $(OUT_LIBRARY) $(OBJS)
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp $(OBJDIR)/%.o: $(SRCDIR)/%.cpp
mkdir -p $(OBJDIR) mkdir -p $(OBJDIR)
$(CC) $(CFLAGS) -c $? -o $@ $(CC) $(CFLAGS) -c $? -o $@
.PHONY: clean depend fresh .PHONY: clean depend fresh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment