Skip to content

Commit

Permalink
FIX: using pre-prepared makefile for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Oct 25, 2017
1 parent f06bdab commit d78caf6
Showing 1 changed file with 25 additions and 30 deletions.
55 changes: 25 additions & 30 deletions make/makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# REBOL Makefile -- Generated by make-make.r (do not edit) on 25-Oct-2017/17:18:42+2:00
# REBOL Makefile -- Generated by make-make.r (do not edit) on 25-Oct-2017/23:16:40+2:00
# This makefile is intentional kept simple to make builds possible on
# a wider range of target platforms.

Expand All @@ -23,9 +23,9 @@ STRIP= $(TOOLS)strip
# CP allows different copy progs:
CP= cp
# LS allows different ls progs:
LS= dir
LS= ls -l
# RM allows different RM progs:
RM= DEL /s /q
RM= @-rm -rf
# UP - some systems do not use ../
UP= ..
# CD - some systems do not use ./
Expand All @@ -39,22 +39,22 @@ R= $S/core
INCL ?= .
I= -I$(INCL) -I$S/include/

TO_OS?= TO_WIN32
OS_ID?= 0.3.1
BIN_SUFFIX= .exe
LIB_SUFFIX= .dll
RES= "objs/r3.res"
RAPI_FLAGS= -O2 -DUNICODE -m32 -DENDIAN_LITTLE
HOST_FLAGS= -DREB_EXE -O2 -DUNICODE -m32 -DENDIAN_LITTLE -D_FILE_OFFSET_BITS=64
TO_OS?= TO_LINUX
OS_ID?= 0.4.2
BIN_SUFFIX=
LIB_SUFFIX= .so
RES=
RAPI_FLAGS= -O2 -fPIC -DENDIAN_LITTLE
HOST_FLAGS= -DREB_EXE -O2 -DENDIAN_LITTLE -D_FILE_OFFSET_BITS=64
RLIB_FLAGS=

# Flags for core and for host:
RFLAGS= -c -D$(TO_OS) -DREB_API $(RAPI_FLAGS) $I
HFLAGS= -c -D$(TO_OS) -DREB_CORE $(HOST_FLAGS) $I
CLIB= -m32 -lwsock32 -lcomdlg32 -mconsole -Wl,--stack=4194300 -lm
CLIB= -ldl -lm

# REBOL is needed to build various include files:
REBOL_TOOL= prebuild/r3-make-win.exe
REBOL_TOOL= prebuild/r3-make-linux
REBOL= $(CD)$(REBOL_TOOL) -qs

# For running tests, ship, build, etc.
Expand All @@ -79,7 +79,6 @@ all:
$(MAKE) r3$(BIN_SUFFIX)
$(MAKE) lib
$(MAKE) host$(BIN_SUFFIX)
$(MAKE) testdo

prep:
$(REBOL) $T/make-headers.r
Expand Down Expand Up @@ -113,7 +112,7 @@ purge:
$(MAKE) host$(BIN_SUFFIX)

testdo:
r3$(BIN_SUFFIX) --do "print {^/^[[1;32m### I'm READY ###^[[0m^/}"
$(CD)r3$(BIN_SUFFIX) --do "print {^/^[[1;32m### I'm READY ###^[[0m^/}"

test:
$(CP) r3$(BIN_SUFFIX) $(UP)/src/tests/
Expand Down Expand Up @@ -162,14 +161,10 @@ OBJS = objs/a-constants.o objs/a-globals.o objs/a-lib.o objs/b-boot.o \
objs/u-parse.o objs/u-png.o objs/u-sha1.o objs/u-zlib.o

HOST = objs/host-main.o objs/host-args.o objs/host-device.o objs/host-stdio.o \
objs/dev-net.o objs/dev-dns.o objs/host-lib.o objs/dev-stdio.o \
objs/dev-file.o objs/dev-event.o objs/dev-clipboard.o
objs/dev-net.o objs/dev-dns.o objs/host-lib.o objs/host-readline.o \
objs/dev-stdio.o objs/dev-event.o objs/dev-file.o


# Compile resources:
$(RES):
$(TOOLS)windres r3.rc -O coff -o $(RES)

# Directly linked r3 executable:
r3$(BIN_SUFFIX): tmps objs $(OBJS) $(HOST) $(RES)
$(CC) -o r3$(BIN_SUFFIX) $(OBJS) $(HOST) $(RES) $(CLIB)
Expand Down Expand Up @@ -496,18 +491,18 @@ objs/dev-net.o: $S/os/dev-net.c
objs/dev-dns.o: $S/os/dev-dns.c
$(CC) $S/os/dev-dns.c $(HFLAGS) -o objs/dev-dns.o

objs/host-lib.o: $S/os/win32/host-lib.c
$(CC) $S/os/win32/host-lib.c $(HFLAGS) -o objs/host-lib.o
objs/host-lib.o: $S/os/posix/host-lib.c
$(CC) $S/os/posix/host-lib.c $(HFLAGS) -o objs/host-lib.o

objs/dev-stdio.o: $S/os/win32/dev-stdio.c
$(CC) $S/os/win32/dev-stdio.c $(HFLAGS) -o objs/dev-stdio.o
objs/host-readline.o: $S/os/posix/host-readline.c
$(CC) $S/os/posix/host-readline.c $(HFLAGS) -o objs/host-readline.o

objs/dev-file.o: $S/os/win32/dev-file.c
$(CC) $S/os/win32/dev-file.c $(HFLAGS) -o objs/dev-file.o
objs/dev-stdio.o: $S/os/posix/dev-stdio.c
$(CC) $S/os/posix/dev-stdio.c $(HFLAGS) -o objs/dev-stdio.o

objs/dev-event.o: $S/os/win32/dev-event.c
$(CC) $S/os/win32/dev-event.c $(HFLAGS) -o objs/dev-event.o
objs/dev-event.o: $S/os/posix/dev-event.c
$(CC) $S/os/posix/dev-event.c $(HFLAGS) -o objs/dev-event.o

objs/dev-clipboard.o: $S/os/win32/dev-clipboard.c
$(CC) $S/os/win32/dev-clipboard.c $(HFLAGS) -o objs/dev-clipboard.o
objs/dev-file.o: $S/os/posix/dev-file.c
$(CC) $S/os/posix/dev-file.c $(HFLAGS) -o objs/dev-file.o

0 comments on commit d78caf6

Please sign in to comment.