Giter Site home page Giter Site logo

noob's Introduction

noob

no (original) build. bootstrapped build system in c.

inspired by tsodings nob in name and idea.

i have been using it myself in my balls-io game.

example

// noob.c
#include "noob.h"

int main(int argc, const char * argv) {
  RebuildYourself(argc, argv);
  
  BuildCommand *bc = CreateBuildCommand(128);
  // do all your build logic here
  AddCommand(bc, "gcc main.c -o main");
  RunCommand(bc);
  FreeCommand(bc);

  return 0;
}

basic principle

to build even a complex c project you should only need a c compiler and nothing else, no make, cmake or even shell scripting needed.

noob aims to be a build system you write yourself in c. within the main function of noob.c you'll start out with the rebuildyourself step.

afterwards you construct the build steps for your main project (calling your compiler, linker, ...).

rebuild yourself step:

RebuildYourself

executing the build system will rebuild itself if needed, after a first compilation, no manual recompilation is needed.

any changes made to the noob.c file will automatically be build and then executed, argc and argv are passed along aswell.

additional features

to make life a bit easier when constructing your build i also implemented functions that might help you do just that.

HasFlag() detects whether a flag (./noob DEBUG) was passed.

int main(int argc, const char **argv) {
  RebuildYourself(argc, argv);

  if (HasFlag(argc, argv, "DEBUG")) {
    printf("Debug build\n");
    // do some stuff here //
  } else {
    // do some other stuff here // 
  }
  // maybe even do some stuff here // 
}

noob's People

Contributors

nailuj05 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.