Skip to content

A build template to compile single unit compilation projects

License

Notifications You must be signed in to change notification settings

OUIsolutions/C-Build-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C-Build-Template

A build template to compile single unit compilation projects, in:

  • .deb
  • .rpm
  • linux executable
  • windows 32 bits executable
  • windows 64 bits executable

Requirements

Darwin

install Darwin on version 0.020 with:

curl -L https://github.com/OUIsolutions/Darwin/releases/download/0.020/darwin.out -o darwin.out && sudo chmod +x darwin.out &&  sudo  mv darwin.out /usr/bin/darwin

Docker or Podman

and you also will also need to PODMAN or DOCKER to build the packages (yo can edit these here on CONTANIZER var Config

Build

to build all the packages, just fork these repo, put all your code into src dir (note that your code must compile with gcc --static main.c) and build everything with:

darwin run_blueprint build/ --mode folder amalgamation_build alpine_static_build windowsi32_build windowsi64_build rpm_static_build debian_static_build

Configure build

you can configure every aspect of the build in Config

Build Flags

each build its a Lua function that matchs a flag,note that your function must be runnable by darwin runtine check Darwin Api Usage

flag output what its Function
amalgamation_build release/amalgamation.c a C file with all the code in one file Function implementation
alpine_static_build release/alpine_static.out a linux executable with musl Function implementation
windowsi32_build release/windowsi32.exe a windows 32 bits executable Function implementation
windowsi64_build release/windows64.exe a windows 64 bits executable Function implementation
rpm_static_build release/rpm_static.rpm a rpm package with musl Function implementation
debian_static_build release/debian_static.deb a debian package with musl Function implementation

Extras

Add your build flag

to add your build flag just create a function in build dir and add it:Build Funcs

Testting

you can test all linux distributions with

darwin run_blueprint build  --mode folder test_container <your_distro>

note that the dir "release will be mounted on /release on the container

About

A build template to compile single unit compilation projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published