Skip to content

Commit

Permalink
Change Makefile to work with nix install
Browse files Browse the repository at this point in the history
  • Loading branch information
nichtsfrei committed Jul 25, 2021
1 parent ad7add4 commit 5e58626
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ OUTPUT_OPTION = -Wall -MMD -MP -o $@
CFLAGS = -Wall


ifeq ($(out),)
out := /usr/local
endif

src = $(wildcard src/*.c)
src_o = $(src:.c=.o)
test_src = $(wildcard tests/*.c)
Expand All @@ -22,3 +26,7 @@ tests/all: $(tobj)

clean:
rm -f $(tobj) $(deps) tests/all tnotes

install:
install -d $(out)/bin
install -p ./tnotes $(out)/bin/tnotes
4 changes: 1 addition & 3 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{ pkgs ? import <nixpkgs> { }, ... }:
pkgs.mkShell {
nativeBuildInputs = [
pkgs.ccls
];
buildInputs = [
pkgs.clang-analyzer
pkgs.clang-tools
pkgs.cgreen
pkgs.gnumake
];
}

0 comments on commit 5e58626

Please sign in to comment.