Skip to content
This repository
Browse code

Makefile win32 fixes

Simplify build dependencies on windows
Skip autoheader and autoconf step, for a while.
64bits is not supported anyway.
  • Loading branch information...
commit 2fa56830d4a82a31246e536ea3d80073f451d51c 1 parent 1daed87
Dan Gudmundsson authored November 10, 2011 dgud committed December 16, 2011

Showing 2 changed files with 26 additions and 11 deletions. Show diff stats Hide diff stats

  1. 2  .gitignore
  2. 35  c_src/Makefile
2  .gitignore
@@ -14,7 +14,7 @@ TAGS
14 14
 
15 15
 # c_src
16 16
 /c_src/autom4te.cache
17  
-/c_src/config.*
  17
+#/c_src/config.*   config.build.in
18 18
 /c_src/configure
19 19
 
20 20
 # Derivates
35  c_src/Makefile
@@ -11,6 +11,11 @@ ERLDIR	:= $(shell erl -noshell -eval "io:format([126,115,126,110],[code:root_dir
11 11
 ERL_C_INCLUDE_DIR := $(ERLDIR)/usr/include
12 12
 OCL_DIR := $(shell cd ..; pwd)
13 13
 
  14
+## Windows start
  15
+ifneq (, $(findstring MINGW32,$(OSNAME)))
  16
+MINGW = Yes
  17
+endif
  18
+
14 19
 MAC_OS_X  = No
15 20
 WIN32_GCC = No
16 21
 WIN32_CL  = No
@@ -24,17 +29,32 @@ SSE3      = No
24 29
 SSE4      = No
25 30
 EXT       = so
26 31
 
  32
+ifneq ($(MINGW), Yes)
  33
+CONFIG_FILE_64 = config.64.build
  34
+CONFIG_FILE_32 = config.32.build
27 35
 ifeq ($(WORDSIZE), 64)
28  
-include config.64.build
  36
+include $(CONFIG_FILE_64)
29 37
 endif
30 38
 ifeq ($(WORDSIZE), 32)
31  
-include config.32.build
  39
+include $(CONFIG_FILE_32)
  40
+endif
  41
+else
  42
+# Skip configure on windows for now we don't have
  43
+# 64bits support anyway, autoconf and lib are a mess
  44
+# to install
  45
+ifeq ($(WORDSIZE), 64)
  46
+   CL_BUILD=false
  47
+else
  48
+   CL_BUILD=true
32 49
 endif
  50
+endif
  51
+
  52
+
33 53
 
34 54
 ifeq ($(TYPE), debug)
35 55
 OBJDIR=../obj/debug
36 56
 LIBDIR=../lib/debug
37  
-CFLAGS += -Ddebug -DDEBUG -g -Wall -Wextra -Wswitch-default -Wswitch-enum -D_THREAD_SAFE 
  57
+CFLAGS += -Ddebug -DDEBUG -g -Wall -Wextra -Wswitch-default -Wswitch-enum -D_THREAD_SAFE
38 58
 CFLAGS += -D_REENTRANT -fno-common -I$(ERL_C_INCLUDE_DIR)
39 59
 WIN_DEBUG = -Ddebug -DDEBUG
40 60
 endif
@@ -70,11 +90,6 @@ LD_SHARED	:= $(CC) -m64 -bundle -flat_namespace -undefined suppress
70 90
 endif
71 91
 endif
72 92
 
73  
-## Windows start
74  
-ifneq (, $(findstring MINGW32,$(OSNAME)))
75  
-MINGW = Yes
76  
-endif
77  
-
78 93
 ifeq ($(MINGW), Yes)
79 94
 EXT = dll
80 95
 
@@ -185,11 +200,11 @@ OCL_SIMD_OBJS = $(SIMD_OBJS:%=$(OBJDIR)/%)
185 200
 
186 201
 all:	all32 all64
187 202
 
188  
-all32:	config.32.build
  203
+all32:	$(CONFIG_FILE_32)
189 204
 	$(MAKE) nif TYPE=release WORDSIZE=32
190 205
 	$(MAKE) nif TYPE=debug   WORDSIZE=32
191 206
 
192  
-all64:	config.64.build
  207
+all64:	$(CONFIG_FILE_64)
193 208
 	$(MAKE) nif TYPE=release WORDSIZE=64
194 209
 	$(MAKE) nif TYPE=debug   WORDSIZE=64
195 210
 

0 notes on commit 2fa5683

Please sign in to comment.
Something went wrong with that request. Please try again.