From 634be1fc76ae75c6989625ef3c6b77dd1d652f79 Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Thu, 21 Oct 2010 22:20:28 +0200 Subject: [PATCH] Adding Makefile, and minor corrections --- .gitignore | 2 +- Euuuhh.1 => BrainFuckInterpreter.1 | 4 +-- .../project.pbxproj | 36 +++++++++---------- Heu.c | 2 +- Heu.h | 6 ++-- Makefile | 17 +++++++++ bf.c | 2 +- bf.h | 2 +- bfi | 1 - interpreter.c | 2 +- interpreter.h | 2 +- main.c | 2 +- tokenizer.c | 2 +- tokenizer.h | 2 +- 14 files changed, 48 insertions(+), 34 deletions(-) rename Euuuhh.1 => BrainFuckInterpreter.1 (94%) mode change 100755 => 100644 rename {Euuuhh.xcodeproj => BrainFuckInterpreter.xcodeproj}/project.pbxproj (89%) mode change 100755 => 100644 create mode 100644 Makefile delete mode 120000 bfi diff --git a/.gitignore b/.gitignore index d750474..3aa7679 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,6 @@ *~ *.o build/ -Euuuhh.xcodeproj/* +*.xcodeproj/* !.gitignore diff --git a/Euuuhh.1 b/BrainFuckInterpreter.1 old mode 100755 new mode 100644 similarity index 94% rename from Euuuhh.1 rename to BrainFuckInterpreter.1 index ef121f6..705dc46 --- a/Euuuhh.1 +++ b/BrainFuckInterpreter.1 @@ -4,10 +4,10 @@ .\"man mdoc for the short list of editing options .\"/usr/share/misc/mdoc.template .Dd 20.11.09 \" DATE -.Dt Euuuhh 1 \" Program name and manual section number +.Dt BrainFuckInterpreter 1 \" Program name and manual section number .Os Darwin .Sh NAME \" Section Header - required - don't modify -.Nm Euuuhh, +.Nm BrainFuckInterpreter, .\" The following lines are read in generating the apropos(man -k) database. Use only key .\" words here as the database is built based on the words here and in the .ND line. .Nm Other_name_for_same_program(), diff --git a/Euuuhh.xcodeproj/project.pbxproj b/BrainFuckInterpreter.xcodeproj/project.pbxproj old mode 100755 new mode 100644 similarity index 89% rename from Euuuhh.xcodeproj/project.pbxproj rename to BrainFuckInterpreter.xcodeproj/project.pbxproj index 02ef475..66bd0ac --- a/Euuuhh.xcodeproj/project.pbxproj +++ b/BrainFuckInterpreter.xcodeproj/project.pbxproj @@ -3,12 +3,12 @@ archiveVersion = 1; classes = { }; - objectVersion = 45; + objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 8DD76FAC0486AB0100D96B5E /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* main.c */; settings = {ATTRIBUTES = (); }; }; - 8DD76FB00486AB0100D96B5E /* Euuuhh.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = C6A0FF2C0290799A04C91782 /* Euuuhh.1 */; }; + 8DD76FB00486AB0100D96B5E /* BrainFuckInterpreter.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = C6A0FF2C0290799A04C91782 /* BrainFuckInterpreter.1 */; }; E7E4EDEF10C85B3700C0DFE7 /* tokenizer.c in Sources */ = {isa = PBXBuildFile; fileRef = E7E4EDEE10C85B3700C0DFE7 /* tokenizer.c */; }; E7E4EDFF10C85EA000C0DFE7 /* bf.c in Sources */ = {isa = PBXBuildFile; fileRef = E7E4EDFE10C85EA000C0DFE7 /* bf.c */; }; E7E4EE0210C85EB800C0DFE7 /* Heu.c in Sources */ = {isa = PBXBuildFile; fileRef = E7E4EE0110C85EB800C0DFE7 /* Heu.c */; }; @@ -22,7 +22,7 @@ dstPath = /usr/share/man/man1/; dstSubfolderSpec = 0; files = ( - 8DD76FB00486AB0100D96B5E /* Euuuhh.1 in CopyFiles */, + 8DD76FB00486AB0100D96B5E /* BrainFuckInterpreter.1 in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 1; }; @@ -31,7 +31,8 @@ /* Begin PBXFileReference section */ 08FB7796FE84155DC02AAC07 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; 8DD76FB20486AB0100D96B5E /* bfi */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = bfi; sourceTree = BUILT_PRODUCTS_DIR; }; - C6A0FF2C0290799A04C91782 /* Euuuhh.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = Euuuhh.1; sourceTree = ""; }; + C6A0FF2C0290799A04C91782 /* BrainFuckInterpreter.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = BrainFuckInterpreter.1; sourceTree = ""; }; + E710A0521270D5C10048B308 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; E72D4F1A10B73EA500D51B36 /* colors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = colors.h; sourceTree = ""; }; E79ECE0610CE1CF700BE68DA /* tokenizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tokenizer.h; sourceTree = ""; }; E7E4EDEE10C85B3700C0DFE7 /* tokenizer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tokenizer.c; sourceTree = ""; }; @@ -67,6 +68,7 @@ 08FB7795FE84155DC02AAC07 /* Source */ = { isa = PBXGroup; children = ( + E710A0521270D5C10048B308 /* Makefile */, E79ECE0610CE1CF700BE68DA /* tokenizer.h */, E7E4EDEE10C85B3700C0DFE7 /* tokenizer.c */, E72D4F1A10B73EA500D51B36 /* colors.h */, @@ -92,7 +94,7 @@ C6A0FF2B0290797F04C91782 /* Documentation */ = { isa = PBXGroup; children = ( - C6A0FF2C0290799A04C91782 /* Euuuhh.1 */, + C6A0FF2C0290799A04C91782 /* BrainFuckInterpreter.1 */, ); name = Documentation; sourceTree = ""; @@ -123,8 +125,11 @@ /* Begin PBXProject section */ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; - buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "Euuuhh" */; - compatibilityVersion = "Xcode 3.1"; + attributes = { + LastUpgradeCheck = 0500; + }; + buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "BrainFuckInterpreter" */; + compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( @@ -164,8 +169,6 @@ ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; INSTALL_PATH = /usr/local/bin; PRODUCT_NAME = bfi; @@ -177,7 +180,6 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_MODEL_TUNING = G5; INSTALL_PATH = /usr/local/bin; PRODUCT_NAME = bfi; }; @@ -186,26 +188,22 @@ 1DEB928A08733DD80010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(NATIVE_ARCH)"; GCC_C_LANGUAGE_STANDARD = c99; GCC_OPTIMIZATION_LEVEL = 0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - SDKROOT = macosx10.5; + SDKROOT = macosx; }; name = Debug; }; 1DEB928B08733DD80010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(NATIVE_ARCH)"; GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = macosx10.5; + SDKROOT = macosx; }; name = Release; }; @@ -219,16 +217,16 @@ 1DEB928708733DD80010E9CD /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Debug; }; - 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "Euuuhh" */ = { + 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "BrainFuckInterpreter" */ = { isa = XCConfigurationList; buildConfigurations = ( 1DEB928A08733DD80010E9CD /* Debug */, 1DEB928B08733DD80010E9CD /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Debug; }; /* End XCConfigurationList section */ }; diff --git a/Heu.c b/Heu.c index 2567cbb..b83e026 100755 --- a/Heu.c +++ b/Heu.c @@ -1,6 +1,6 @@ /* * Created by Lionel Sambuc on 03.dec.2009. - * Copyright 2009. All rights reserved. + * Copyright 2009-2010. All rights reserved. * */ #include diff --git a/Heu.h b/Heu.h index 16efa15..f1845f3 100755 --- a/Heu.h +++ b/Heu.h @@ -1,6 +1,6 @@ /* * Created by Lionel Sambuc on 03.dec.2009. - * Copyright 2009. All rights reserved. + * Copyright 2009-2010. All rights reserved. * */ @@ -16,8 +16,8 @@ * * Language operator définition : * ****************************** - * > Heu! - * < Heu? + * > Heu ! + * < Heu ? * + Heu... * - Heu. * . Heu, j'avais pensé que. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4ccc08d --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +# +# Created by Lionel Sambuc on 21.oct.2010. +# Copyright 2010-2011. All rights reserved. +# + +all: prepare $(patsubst %.c,build/%.o,$(wildcard *.c)) + gcc -o build/bfi build/*.o + +.PHONY: prepare +prepare: + -mkdir build + +build/%.o: %.c *.h + gcc -c -o $@ $< + +clean: + -rm -rf build \ No newline at end of file diff --git a/bf.c b/bf.c index 551d019..1391aab 100755 --- a/bf.c +++ b/bf.c @@ -1,6 +1,6 @@ /* * Created by Lionel Sambuc on 03.dec.2009. - * Copyright 2009. All rights reserved. + * Copyright 2009-2010. All rights reserved. * */ diff --git a/bf.h b/bf.h index 6913ecd..8a5fe58 100755 --- a/bf.h +++ b/bf.h @@ -1,6 +1,6 @@ /* * Created by Lionel Sambuc on 03.dec.2009. - * Copyright 2009. All rights reserved. + * Copyright 2009-2010. All rights reserved. * */ diff --git a/bfi b/bfi deleted file mode 120000 index 317694b..0000000 --- a/bfi +++ /dev/null @@ -1 +0,0 @@ -build/Debug/bfi \ No newline at end of file diff --git a/interpreter.c b/interpreter.c index 13dee9a..82279b8 100755 --- a/interpreter.c +++ b/interpreter.c @@ -1,6 +1,6 @@ /* * Created by Lionel Sambuc on 03.dec.2009. - * Copyright 2009. All rights reserved. + * Copyright 2009-2010. All rights reserved. * */ diff --git a/interpreter.h b/interpreter.h index ed0a999..20e3a15 100755 --- a/interpreter.h +++ b/interpreter.h @@ -1,6 +1,6 @@ /* * Created by Lionel Sambuc on 03.dec.2009. - * Copyright 2009. All rights reserved. + * Copyright 2009-2010. All rights reserved. * */ diff --git a/main.c b/main.c index 4c9ccb8..4ee485e 100755 --- a/main.c +++ b/main.c @@ -1,6 +1,6 @@ /* * Created by Lionel Sambuc on 03.12.09. - * Copyright 2009. All rights reserved. + * Copyright 2009-2010. All rights reserved. * */ diff --git a/tokenizer.c b/tokenizer.c index 7bb1ca9..62a0918 100755 --- a/tokenizer.c +++ b/tokenizer.c @@ -1,6 +1,6 @@ /* * Created by Lionel Sambuc on 03.dec.2009. - * Copyright 2009. All rights reserved. + * Copyright 2009-2010. All rights reserved. * */ diff --git a/tokenizer.h b/tokenizer.h index dfb36e6..c47311e 100755 --- a/tokenizer.h +++ b/tokenizer.h @@ -1,6 +1,6 @@ /* * Created by Lionel Sambuc on 03.dec.2009. - * Copyright 2009. All rights reserved. + * Copyright 2009-2010. All rights reserved. * */