Adding Makefile, and minor corrections

This commit is contained in:
Lionel Sambuc
2010-10-21 22:20:28 +02:00
committed by Lionel Sambuc
parent 0a443b14f8
commit 634be1fc76
14 changed files with 48 additions and 34 deletions

2
.gitignore vendored
View File

@@ -2,6 +2,6 @@
*~ *~
*.o *.o
build/ build/
Euuuhh.xcodeproj/* *.xcodeproj/*
!.gitignore !.gitignore

4
Euuuhh.1 → BrainFuckInterpreter.1 Executable file → Normal file
View File

@@ -4,10 +4,10 @@
.\"man mdoc for the short list of editing options .\"man mdoc for the short list of editing options
.\"/usr/share/misc/mdoc.template .\"/usr/share/misc/mdoc.template
.Dd 20.11.09 \" DATE .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 .Os Darwin
.Sh NAME \" Section Header - required - don't modify .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 .\" 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. .\" words here as the database is built based on the words here and in the .ND line.
.Nm Other_name_for_same_program(), .Nm Other_name_for_same_program(),

View File

@@ -3,12 +3,12 @@
archiveVersion = 1; archiveVersion = 1;
classes = { classes = {
}; };
objectVersion = 45; objectVersion = 46;
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
8DD76FAC0486AB0100D96B5E /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* main.c */; settings = {ATTRIBUTES = (); }; }; 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 */; }; E7E4EDEF10C85B3700C0DFE7 /* tokenizer.c in Sources */ = {isa = PBXBuildFile; fileRef = E7E4EDEE10C85B3700C0DFE7 /* tokenizer.c */; };
E7E4EDFF10C85EA000C0DFE7 /* bf.c in Sources */ = {isa = PBXBuildFile; fileRef = E7E4EDFE10C85EA000C0DFE7 /* bf.c */; }; E7E4EDFF10C85EA000C0DFE7 /* bf.c in Sources */ = {isa = PBXBuildFile; fileRef = E7E4EDFE10C85EA000C0DFE7 /* bf.c */; };
E7E4EE0210C85EB800C0DFE7 /* Heu.c in Sources */ = {isa = PBXBuildFile; fileRef = E7E4EE0110C85EB800C0DFE7 /* Heu.c */; }; E7E4EE0210C85EB800C0DFE7 /* Heu.c in Sources */ = {isa = PBXBuildFile; fileRef = E7E4EE0110C85EB800C0DFE7 /* Heu.c */; };
@@ -22,7 +22,7 @@
dstPath = /usr/share/man/man1/; dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0; dstSubfolderSpec = 0;
files = ( files = (
8DD76FB00486AB0100D96B5E /* Euuuhh.1 in CopyFiles */, 8DD76FB00486AB0100D96B5E /* BrainFuckInterpreter.1 in CopyFiles */,
); );
runOnlyForDeploymentPostprocessing = 1; runOnlyForDeploymentPostprocessing = 1;
}; };
@@ -31,7 +31,8 @@
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
08FB7796FE84155DC02AAC07 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; }; 08FB7796FE84155DC02AAC07 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; };
8DD76FB20486AB0100D96B5E /* bfi */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = bfi; sourceTree = BUILT_PRODUCTS_DIR; }; 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 = "<group>"; }; C6A0FF2C0290799A04C91782 /* BrainFuckInterpreter.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = BrainFuckInterpreter.1; sourceTree = "<group>"; };
E710A0521270D5C10048B308 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
E72D4F1A10B73EA500D51B36 /* colors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = colors.h; sourceTree = "<group>"; }; E72D4F1A10B73EA500D51B36 /* colors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = colors.h; sourceTree = "<group>"; };
E79ECE0610CE1CF700BE68DA /* tokenizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tokenizer.h; sourceTree = "<group>"; }; E79ECE0610CE1CF700BE68DA /* tokenizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tokenizer.h; sourceTree = "<group>"; };
E7E4EDEE10C85B3700C0DFE7 /* tokenizer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tokenizer.c; sourceTree = "<group>"; }; E7E4EDEE10C85B3700C0DFE7 /* tokenizer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tokenizer.c; sourceTree = "<group>"; };
@@ -67,6 +68,7 @@
08FB7795FE84155DC02AAC07 /* Source */ = { 08FB7795FE84155DC02AAC07 /* Source */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
E710A0521270D5C10048B308 /* Makefile */,
E79ECE0610CE1CF700BE68DA /* tokenizer.h */, E79ECE0610CE1CF700BE68DA /* tokenizer.h */,
E7E4EDEE10C85B3700C0DFE7 /* tokenizer.c */, E7E4EDEE10C85B3700C0DFE7 /* tokenizer.c */,
E72D4F1A10B73EA500D51B36 /* colors.h */, E72D4F1A10B73EA500D51B36 /* colors.h */,
@@ -92,7 +94,7 @@
C6A0FF2B0290797F04C91782 /* Documentation */ = { C6A0FF2B0290797F04C91782 /* Documentation */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
C6A0FF2C0290799A04C91782 /* Euuuhh.1 */, C6A0FF2C0290799A04C91782 /* BrainFuckInterpreter.1 */,
); );
name = Documentation; name = Documentation;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -123,8 +125,11 @@
/* Begin PBXProject section */ /* Begin PBXProject section */
08FB7793FE84155DC02AAC07 /* Project object */ = { 08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject; isa = PBXProject;
buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "Euuuhh" */; attributes = {
compatibilityVersion = "Xcode 3.1"; LastUpgradeCheck = 0500;
};
buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "BrainFuckInterpreter" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English; developmentRegion = English;
hasScannedForEncodings = 1; hasScannedForEncodings = 1;
knownRegions = ( knownRegions = (
@@ -164,8 +169,6 @@
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO; GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0; GCC_OPTIMIZATION_LEVEL = 0;
INSTALL_PATH = /usr/local/bin; INSTALL_PATH = /usr/local/bin;
PRODUCT_NAME = bfi; PRODUCT_NAME = bfi;
@@ -177,7 +180,6 @@
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_MODEL_TUNING = G5;
INSTALL_PATH = /usr/local/bin; INSTALL_PATH = /usr/local/bin;
PRODUCT_NAME = bfi; PRODUCT_NAME = bfi;
}; };
@@ -186,26 +188,22 @@
1DEB928A08733DD80010E9CD /* Debug */ = { 1DEB928A08733DD80010E9CD /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ARCHS = "$(NATIVE_ARCH)";
GCC_C_LANGUAGE_STANDARD = c99; GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0; GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO; SDKROOT = macosx;
SDKROOT = macosx10.5;
}; };
name = Debug; name = Debug;
}; };
1DEB928B08733DD80010E9CD /* Release */ = { 1DEB928B08733DD80010E9CD /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ARCHS = "$(NATIVE_ARCH)";
GCC_C_LANGUAGE_STANDARD = c99; GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO; SDKROOT = macosx;
SDKROOT = macosx10.5;
}; };
name = Release; name = Release;
}; };
@@ -219,16 +217,16 @@
1DEB928708733DD80010E9CD /* Release */, 1DEB928708733DD80010E9CD /* Release */,
); );
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release; defaultConfigurationName = Debug;
}; };
1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "Euuuhh" */ = { 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "BrainFuckInterpreter" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;
buildConfigurations = ( buildConfigurations = (
1DEB928A08733DD80010E9CD /* Debug */, 1DEB928A08733DD80010E9CD /* Debug */,
1DEB928B08733DD80010E9CD /* Release */, 1DEB928B08733DD80010E9CD /* Release */,
); );
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release; defaultConfigurationName = Debug;
}; };
/* End XCConfigurationList section */ /* End XCConfigurationList section */
}; };

2
Heu.c
View File

@@ -1,6 +1,6 @@
/* /*
* Created by Lionel Sambuc on 03.dec.2009. * Created by Lionel Sambuc on 03.dec.2009.
* Copyright 2009. All rights reserved. * Copyright 2009-2010. All rights reserved.
* *
*/ */
#include <stdio.h> #include <stdio.h>

6
Heu.h
View File

@@ -1,6 +1,6 @@
/* /*
* Created by Lionel Sambuc on 03.dec.2009. * 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 : * Language operator définition :
* ****************************** * ******************************
* > Heu! * > Heu !
* < Heu? * < Heu ?
* + Heu... * + Heu...
* - Heu. * - Heu.
* . Heu, j'avais pensé que. * . Heu, j'avais pensé que.

17
Makefile Normal file
View File

@@ -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

2
bf.c
View File

@@ -1,6 +1,6 @@
/* /*
* Created by Lionel Sambuc on 03.dec.2009. * Created by Lionel Sambuc on 03.dec.2009.
* Copyright 2009. All rights reserved. * Copyright 2009-2010. All rights reserved.
* *
*/ */

2
bf.h
View File

@@ -1,6 +1,6 @@
/* /*
* Created by Lionel Sambuc on 03.dec.2009. * Created by Lionel Sambuc on 03.dec.2009.
* Copyright 2009. All rights reserved. * Copyright 2009-2010. All rights reserved.
* *
*/ */

1
bfi
View File

@@ -1 +0,0 @@
build/Debug/bfi

View File

@@ -1,6 +1,6 @@
/* /*
* Created by Lionel Sambuc on 03.dec.2009. * Created by Lionel Sambuc on 03.dec.2009.
* Copyright 2009. All rights reserved. * Copyright 2009-2010. All rights reserved.
* *
*/ */

View File

@@ -1,6 +1,6 @@
/* /*
* Created by Lionel Sambuc on 03.dec.2009. * Created by Lionel Sambuc on 03.dec.2009.
* Copyright 2009. All rights reserved. * Copyright 2009-2010. All rights reserved.
* *
*/ */

2
main.c
View File

@@ -1,6 +1,6 @@
/* /*
* Created by Lionel Sambuc on 03.12.09. * Created by Lionel Sambuc on 03.12.09.
* Copyright 2009. All rights reserved. * Copyright 2009-2010. All rights reserved.
* *
*/ */

View File

@@ -1,6 +1,6 @@
/* /*
* Created by Lionel Sambuc on 03.dec.2009. * Created by Lionel Sambuc on 03.dec.2009.
* Copyright 2009. All rights reserved. * Copyright 2009-2010. All rights reserved.
* *
*/ */

View File

@@ -1,6 +1,6 @@
/* /*
* Created by Lionel Sambuc on 03.dec.2009. * Created by Lionel Sambuc on 03.dec.2009.
* Copyright 2009. All rights reserved. * Copyright 2009-2010. All rights reserved.
* *
*/ */