Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Mr-Kitty

Pages: [1]
1
Alternatively, using clang, if you have that installed, should work. Works for me under Linux.

(I tried to post this yesterday evening, but my session timed out and I didn't notice)

Just tried it, can confirm it works. Replace all instances of "gcc" with "clang" (Obviously clang has to be installed, not sure if it is by default(Edit: It comes with the Xcode command line tools))

Spoiler For build with clang Makefile:
Code: [Select]
CC:=clang
CFLAGS:=-W -Wall -m32
LDFLAGS:= -lssl -lz -m32
VPATH := minizip-1.1

OS ?= `uname -s`
ifeq ($(OS),Windows_NT)
  EXEEXT = .exe
else
CFLAGS := $(CFLAGS) -DUSE_FILE32API
LDFLAGS:= $(LDFLAGS) -lcrypto
endif

all: luna$(EXEEXT)

luna$(EXEEXT): luna.o zip.o ioapi.o
clang -o $@ $^ $(LDFLAGS)

dist: clean all
mkdir -p dist/src
rm -f *.o
find . -maxdepth 1 ! -name 'luna$(EXEEXT)' -a ! -name dist -a ! -name . -exec cp -r {} dist/src \;
cp luna$(EXEEXT) *.dll *.txt dist

clean:
rm -rf *.o luna$(EXEEXT) dist

2
For those of you who are on OS X and are having trouble building Luna, I found out why it won't build. In the Luna's readme, it states you need gcc >=4.5, but apple's gcc is gcc 4.2. Using MacPorts (or Homebrew, Fink), install gcc 4.7 (run "sudo port install gcc47"). Then open up Luna's Makefile with a text editor and change any instances of "gcc" to "/opt/local/bin/gcc-mp-4.7". Cd to the Luna directory in Terminal, and do make "dist luna", and it builds!

Code: [Select]
CC:=/opt/local/bin/gcc-mp-4.7
CFLAGS:=-W -Wall -m32
LDFLAGS:= -lssl -lz -m32
VPATH := minizip-1.1

OS ?= `uname -s`
ifeq ($(OS),Windows_NT)
  EXEEXT = .exe
else
CFLAGS := $(CFLAGS) -DUSE_FILE32API
LDFLAGS:= $(LDFLAGS) -lcrypto
endif

all: luna$(EXEEXT)

luna$(EXEEXT): luna.o zip.o ioapi.o
/opt/local/bin/gcc-mp-4.7 -o $@ $^ $(LDFLAGS)

dist: clean all
mkdir -p dist/src
rm -f *.o
find . -maxdepth 1 ! -name 'luna$(EXEEXT)' -a ! -name dist -a ! -name . -exec cp -r {} dist/src \;
cp luna$(EXEEXT) *.dll *.txt dist

clean:
rm -rf *.o luna$(EXEEXT) dist

Also, link for those who don't want to build themselves:
https://dl.dropbox.com/u/4657389/luna-v3.0a-osx-intel.zip

Pages: [1]