Created
September 27, 2011 17:37
-
-
Save OlivierA/1245708 to your computer and use it in GitHub Desktop.
Luna's portable Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC:=gcc | |
CFLAGS:=-W -Wall -m32 | |
LDFLAGS:= -lssl -lz -m32 | |
VPATH := minizip-1.1 | |
OS ?= `uname -s` | |
ifeq ($(OS),Windows_NT) | |
EXEEXT = .exe | |
else | |
CFLAGS=$(CFLAGS) -Dfopen64=fopen -Dfseeko64=fseeko -Dftello64=ftello | |
LDFLAGS=$(LDFLAGS) -lcrypto | |
endif | |
all: luna$(EXEEXT) | |
luna$(EXEEXT): luna.o zip.o ioapi.o | |
gcc -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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment