Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a6b4e8ca6 |
4 changed files with 771 additions and 742 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -13,4 +13,3 @@ stats.ods
|
|||
|
||||
bin/
|
||||
typescript
|
||||
.main.c.swp
|
||||
|
|
|
|||
|
|
@ -30,13 +30,6 @@
|
|||
python3
|
||||
];
|
||||
};
|
||||
packages.default = pkgs.stdenv.mkDerivation rec {
|
||||
pname = "4-variable-simplifier";
|
||||
version = "1.0";
|
||||
src = ./.;
|
||||
nativeBuildInputs = with pkgs; [ gcc gnumake ];
|
||||
buildInputs = with pkgs; [ readline.dev ];
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
13
makefile
13
makefile
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
# vim: noexpandtab tabstop=4 :
|
||||
|
||||
PREFIX ?= ${out}
|
||||
PREFIX ?= ${HOME}
|
||||
|
||||
args =
|
||||
|
|
@ -15,23 +14,21 @@ cflags = -Werror -Wall -Wextra -Wstrict-prototypes -Wfatal-errors
|
|||
|
||||
cflags += -O3
|
||||
|
||||
# cflags += -Wno-unused
|
||||
cflags += -Wno-unused
|
||||
|
||||
ldflags += -lreadline -lm
|
||||
|
||||
bin/4-variable-simplifier: main.c | bin/
|
||||
/tmp/4-variable-simplifier: main.c
|
||||
$(cc) $(cppflags) $(cflags) $< -o $@ $(ldflags)
|
||||
|
||||
bin/:
|
||||
mkdir -pv bin
|
||||
|
||||
run: bin/4-variable-simplifier
|
||||
run: /tmp/4-variable-simplifier
|
||||
$< $(args)
|
||||
|
||||
install: ${PREFIX}/bin/4-variable-simplifier
|
||||
|
||||
${PREFIX}/bin/4-variable-simplifier: bin/4-variable-simplifier
|
||||
${PREFIX}/bin/4-variable-simplifier: /tmp/4-variable-simplifier
|
||||
mkdir -pv ${PREFIX}/bin/
|
||||
cp -vau $< $@
|
||||
|
||||
# nix --extra-experimental-features nix-command --extra-experimental-features flakes develop --command 'make'
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue