set base for dev env makefile readme gitignore and a basic main.c
This commit is contained in:
parent
0cbf4f7de6
commit
2242392d54
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
cocomobile-tui
|
||||
15
Makefile
Normal file
15
Makefile
Normal file
@ -0,0 +1,15 @@
|
||||
CC := gcc
|
||||
CFLAGS := -Wall -Wextra -O2
|
||||
LDFLAGS := -lncurses
|
||||
|
||||
SRC := src/main.c
|
||||
TARGET := cocomobile-tui
|
||||
|
||||
.PHONY: all clean
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(SRC)
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET)
|
||||
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1764950072,
|
||||
"narHash": "sha256-BmPWzogsG2GsXZtlT+MTcAWeDK5hkbGRZTeZNW42fwA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f61125a668a320878494449750330ca58b78c557",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
19
flake.nix
Normal file
19
flake.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
description = "cocomobile dev env";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = { nixpkgs, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in {
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
packages = with pkgs;[
|
||||
gcc
|
||||
gdb
|
||||
ncurses
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
12
src/main.c
Normal file
12
src/main.c
Normal file
@ -0,0 +1,12 @@
|
||||
#include <ncurses.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
initscr();
|
||||
printw("Hello World !!!");
|
||||
refresh();
|
||||
getch();
|
||||
endwin();
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user