Created
June 3, 2016 12:02
-
-
Save haxpor/58e7b858f499749744a5c85b294a15b4 to your computer and use it in GitHub Desktop.
Objc syntax and compilation makefile for quick and dirty check if everything alright before grabbing all the files to create a final library in XCode.
This file contains hidden or 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
# Makefile to compile or check syntax of wrapper, and its tester class | |
CC=clang++ | |
FRAMEWORKS=-framework Foundation | |
FRAMEWORKS+=-framework UIKit | |
FRAMEWORKS+=-framework SystemConfiguration | |
FRAMEWORKS+=-framework CoreMotion | |
FRAMEWORKS+=-framework CoreLocation | |
FRAMEWORKS+=-framework CoreGraphics | |
FRAMEWORKS+=-framework Security | |
LIBRARIES:= -lobjc ../pblib.a | |
SOURCE1=PlaybasisWrapper.mm | |
SOURCE2=PlaybasisWrapperTester.mm | |
SOURCE3=Populator.mm | |
LIBB=../ | |
LIBINCLUDE=-I../ -I../ui -I../libs/Reachability/ -I../libs/KLCPopup/ -I../libs/MBProgressHUD/ -I../libs/RNCryptor/ | |
CFLAGS1=$(LIBINCLUDE) -arch i386 -Wall -Werror -g -v -c $(SOURCE1) -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk -std=c++11 | |
CFLAGS2=$(LIBINCLUDE) -arch i386 -Wall -Werror -g -v -c $(SOURCE2) -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk -std=c++11 | |
CFLAGS3=$(LIBINCLUDE) -arch i386 -Wall -Werror -g -v -c $(SOURCE3) -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk -std=c++11 | |
LDFLAGS=$(LIBRARIES) $(FRAMEWORKS) | |
OUTNAME1=PlaybasisWrapper.o | |
OUTNAME2=PlaybasisWrapperTester.o | |
OUTNAME3=Populator.o | |
EXE=PlaybasisWrapperTester | |
OUT1=-o $(OUTNAME1) | |
OUT2=-o $(OUTNAME2) | |
OUT3=-o $(OUTNAME3) | |
all: | |
$(CC) $(CFLAGS1) $(OUT1) | |
$(CC) $(CFLAGS2) $(OUT2) | |
$(CC) $(CFLAGS3) $(OUT3) | |
#$(CC) $(CFLAGS2) $(LDFLAGS) $(OUT2) | |
#$(CC) -arch i386 $(OUTNAME1) $(OUTNAME2) -o $(EXE) | |
syntax: | |
$(CC) $(CFLAGS1) -fsyntax-only | |
$(CC) $(CFLAGS3) -fsyntax-only | |
clean: | |
rm PlaybasisWrapper.o | |
rm PlaybasisWrapperTester.o | |
rm Populator.o | |
rm -rf PlaybasisWrapper.o.dSYM | |
rm -rf PlaybasisWrapperTester.o.dSYM | |
rm -rf Populator.o.dSYM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment