and delete a bunch (but not all) redundant code. If you compare the remaining implementations of Platform*Simulator.cpp, there is still an obvious leftover cleanup task. Specifically, this patch - removes SDK initialization from dotest (there is equivalent but more complete code in Makefile.rules) - make Platform*Simulator inherit the generic implementation of PlatformAppleSimulator (more can be done here) - simplify the platform logic in Makefile.rules - replace the custom SDK finding logic in Platform*Simulator with XcodeSDK - adds a test for each supported simulator Differential Revision: https://reviews.llvm.org/D81980
19 lines
544 B
Makefile
19 lines
544 B
Makefile
all: clean $(EXE)
|
|
|
|
include Makefile.rules
|
|
|
|
$(EXE): a.c clean
|
|
$(CC) -isysroot "$(SDKROOT)" -arch i386 -g -c $(SRCDIR)/a.c
|
|
ar -q liba-i386.a a.o
|
|
ranlib liba-i386.a
|
|
$(CC) -isysroot "$(SDKROOT)" -arch x86_64 -g -c $(SRCDIR)/a.c
|
|
ar -q liba-x86_64.a a.o
|
|
ranlib liba-x86_64.a
|
|
lipo -create -output liba.a liba-i386.a liba-x86_64.a
|
|
$(CC) -isysroot "$(SDKROOT)" -g -c $(SRCDIR)/main.c
|
|
$(CC) -isysroot "$(SDKROOT)" -o a.out main.o -L. -la
|
|
|
|
clean::
|
|
rm -rf a.o a.out liba-i386.a liba-x86_64.a liba.a $(wildcard *un~ .*un~ main.o *.pyc)
|
|
|