Skip to content

Commit

Permalink
Merge remote-tracking branch 'github/release' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
iocane committed Feb 6, 2016
2 parents fd4029b + 58e6e07 commit 6c58310
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 23 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@ Building

### Linux

_The build scripts assume you are using a 64 bit compiler even if targeting a 32 bit architecture. Using a 32 bit version of gcc, e.g., will require some changes to the build scripts._

1. Make sure tup is in your PATH
2. Type `tup` in the working directory

### Windows (Visual Studio 2013 Community)

_The build scripts only target 64 bit Windows builds at the moment._

1. Make sure tup is in your PATH
2. From the Visual Studio Tools folder run the command prompt appropriate for your build
3. Change to the Unbox source directory and type `tup`
Expand Down
16 changes: 9 additions & 7 deletions config/linux
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ else
endif

ifeq (@(X86_64),y)
lib_cflags += -D_UNIX64
lib_cflags += -DC_64=1
con_cflags += -DC_64=1
else
lib_cflags += -m32
lib_lflags += -m32
con_cflags += -m32
con_lflags += -m32
lib_cflags += -m32 -mpc64 -DC_64=0
lib_lflags += -m32 -mpc64
con_cflags += -m32 -mpc64 -DC_64=0
con_lflags += -m32 -mpc64
tsdll_cflags += -m32 -mpc64
endif

ifeq (@(READLINE),y)
Expand Down Expand Up @@ -59,9 +61,9 @@ defdir = src/libj/defs

# defs
: foreach $(defdir)/*.sym | $(libj) $(jcon) {prof} |> ^ SYM2IJS %f^ $(jcon) -sym2ijs $(defdir)/ %B |> $(defdir)/%B.c
: foreach $(defdir)/*.c |> ^ CC %f^ $(CC) %f -o %o |> bin/%B {defs}
: foreach $(defdir)/*.c |> ^ CC %f^ $(CC) -Isrc/libj/defs %f -o %o |> bin/%B {defs}
: foreach {defs} |> ^ DEFS %f^ %f > %o |> bin/%B.ijs

# test dll
: test/dll/tsdll.c |> ^ CC %f^ $(CC) %f -shared -fPIC -o %o |> bin/%B.$(so)
: test/dll/tsdll.c |> ^ CC %f^ $(CC) $(tsdll_cflags) %f -shared -fPIC -o %o |> bin/%B.$(so)

26 changes: 12 additions & 14 deletions config/macosx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
vplatform = macosx

so = so
lib_cflags = -DNOASM -fPIC
lib_lflags = -shared -lm
Expand All @@ -11,21 +10,21 @@ ifeq (@(CLANG),y)
CC += -Wno-parentheses -Wno-unused-value -Wno-pointer-sign
CC += -Wno-empty-body -Wno-return-type -Wno-constant-logical-operand
CC += -Wno-comment -Wno-string-plus-int -Wno-unsequenced
lib_cflags += -O1
con_cflags += -O1
optlevel = -O1
else
CC = gcc
lib_cflags += -O2
con_cflags += -O2
optlevel = -O1
endif

ifeq (@(X86_64),y)
lib_cflags += -D_UNIX64
lib_cflags += -DC_64=1
con_cflags += -DC_64=1
else
lib_cflags += -m32
lib_lflags += -m32
con_cflags += -m32
con_lflags += -m32
lib_cflags += -m32 -mpc64 -DC_64=0
lib_lflags += -m32 -mpc64
con_cflags += -m32 -mpc64 -DC_64=0
con_lflags += -m32 -mpc64
tsdll_cflags += -m32 -mpc64
endif

ifeq (@(READLINE),y)
Expand All @@ -34,8 +33,8 @@ ifeq (@(READLINE),y)
endif

ifeq (@(RELEASE),n)
lib_cflags += -g3 -ggdb3 -gdwarf-4 -DDEBUG
con_cflags += -g3 -ggdb3 -gdwarf-4
lib_cflags += -O0 -g3 -ggdb3 -gdwarf-4 -DDEBUG
con_cflags += -O0 -g3 -ggdb3 -gdwarf-4
else
lib_cflags += -fomit-frame-pointer
con_cflags += -fomit-frame-pointer
Expand All @@ -47,8 +46,7 @@ jcon = bin/jconsole
defdir = src/libj/defs

# version
jversion = $(vrelease)/$(varch)/$(vplatform)/$(vdesc)/$(vbuild)/$(vlink)/$(vdate)
: |> echo '#define JVERSION "$(jversion)"' > %o |> $(jver)
: |> config/jversion.sh $(vrelease) $(varch) $(vlink) $(vplatform) > $(jver) |> $(jver)

# libj
: foreach $(src_lib) | $(jver) |> ^ CC %f^ $(CC) $(lib_cflags) -c %f -o %o |> build/%B.o {libj}
Expand Down
4 changes: 2 additions & 2 deletions config/win32
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
vplatform = windows
so = dll
src_lib += src\libj\win\*.c src\libj\win\*.cpp
lib_cflags = /c /D_JDLL /DC_NA=0 /DWIN64
lib_cflags = /c /D_JDLL /DC_NA=0 /DC_64=1
lib_lflags = OleAut32.lib AdvApi32.lib Ole32.lib src\libj\win\winasm64.obj src\libj\win\jdll.def
lib_extra = bin\j.lib bin\j.exp
con_cflags = /c /DWIN64
con_cflags = /c /DC_64=1
con_lflags = /STACK:8096000
con_extra =

Expand Down

0 comments on commit 6c58310

Please sign in to comment.