Index: app/src/processing/app/debug/Compiler.java
===================================================================
--- app/src/processing/app/debug/Compiler.java	(Revision 882)
+++ app/src/processing/app/debug/Compiler.java	(Arbeitskopie)
@@ -172,6 +172,14 @@
 
     baseCommandLinker.add(runtimeLibraryName);
     baseCommandLinker.add("-L" + buildPath);
+    baseCommandLinker.add("-L" + corePath);
+
+    String avrLdFlags = boardPreferences.get("build.ldflags");
+    
+    if (avrLdFlags != null) {    
+        baseCommandLinker.add(avrLdFlags);
+    }
+
     baseCommandLinker.add("-lm");
 
     execAsynchronously(baseCommandLinker);
@@ -478,6 +486,11 @@
       "-DARDUINO=" + Base.REVISION,
     }));
 
+    String boardId = boardPreferences.get("build.boardid");
+    if (boardId != null) {
+        baseCommandCompiler.add("-D" + boardId + "=1");
+    }
+
     for (int i = 0; i < includePaths.size(); i++) {
       baseCommandCompiler.add("-I" + (String) includePaths.get(i));
     }
@@ -505,6 +518,11 @@
       "-DARDUINO=" + Base.REVISION,
     }));
 		
+    String boardId = boardPreferences.get("build.boardid");
+    if (boardId != null) {
+        baseCommandCompiler.add("-D" + boardId + "=1");
+    }
+    
     for (int i = 0; i < includePaths.size(); i++) {
       baseCommandCompiler.add("-I" + (String) includePaths.get(i));
     }
@@ -534,6 +552,11 @@
       "-DARDUINO=" + Base.REVISION,
     }));
 
+    String boardId = boardPreferences.get("build.boardid");
+    if (boardId != null) {
+        baseCommandCompilerCPP.add("-D" + boardId + "=1");
+    }
+
     for (int i = 0; i < includePaths.size(); i++) {
       baseCommandCompilerCPP.add("-I" + (String) includePaths.get(i));
     }
