From 3d45bad15ac9a3bee8d6aa3ffa9f0bc3c6a480fd Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 11 Mar 2011 07:03:55 -0800 Subject: [PATCH] Separate out Version.mm: faster compile. --- MobileCydia.mm | 7 +++---- Version.mm | 3 +++ makefile | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 Version.mm diff --git a/MobileCydia.mm b/MobileCydia.mm index bd5ddb93..f842c175 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -208,8 +208,7 @@ void PrintTimes() { #define _end } /* }}} */ -#include "Version.h" -#define Cydia_ CYDIA_VERSION +extern NSString *Cydia_; #define lprintf(args...) fprintf(stderr, args) @@ -3987,7 +3986,7 @@ static _H Diversions_; } - (NSString *) version { - return @ Cydia_; + return Cydia_; } - (NSString *) device { @@ -4594,7 +4593,7 @@ static _H Diversions_; } - (NSString *) applicationNameForUserAgent { - NSString *application([NSString stringWithFormat:@"Cydia/%@", @ Cydia_]); + NSString *application([NSString stringWithFormat:@"Cydia/%@", Cydia_]); if (Safari_ != nil) application = [NSString stringWithFormat:@"Safari/%@ %@", Safari_, application]; diff --git a/Version.mm b/Version.mm new file mode 100644 index 00000000..83f5982f --- /dev/null +++ b/Version.mm @@ -0,0 +1,3 @@ +#include +#include "Version.h" +NSString *Cydia_ = @ CYDIA_VERSION; diff --git a/makefile b/makefile index 18dc376d..293bc762 100644 --- a/makefile +++ b/makefile @@ -67,7 +67,7 @@ dirs := Menes CyteKit Cydia SDURLCache code := $(foreach dir,$(dirs),$(wildcard $(foreach ext,h hpp c cpp m mm,$(dir)/*.$(ext)))) code := $(filter-out SDURLCache/SDURLCacheTests.m,$(code)) -code += MobileCydia.mm iPhonePrivate.h Cytore.hpp lookup3.c +code += MobileCydia.mm Version.mm iPhonePrivate.h Cytore.hpp lookup3.c source := $(filter %.m,$(code)) $(filter %.mm,$(code)) source += $(filter %.c,$(code)) $(filter %.cpp,$(code)) @@ -106,7 +106,7 @@ Objects/%.o: %.mm $(header) @echo "[cycc] $<" @$(cycc) -c -o $@ $< $(flags) $(xflags) -Objects/MobileCydia.o: version.h +Objects/Version.o: version.h Images/%.png: %.png @mkdir -p $(dir $@) -- 2.47.2