about summary refs log tree commit diff
path: root/src/Makefile
blob: 2372572758ad1d8658d048ca6bb509a668613ffe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
all: nix nix-instantiate

SYSTEM = $(shell ./config.guess)

nix: nix.o md5.o
	g++ -g -o $@ $^ -ldb_cxx-4

%.o: %.cc
	g++ -g -Wall -o $@ -c $< -DSYSTEM=\"$(SYSTEM)\"

%.o: %.c
	gcc -g -Wall -o $@ -c $< -DSYSTEM=\"$(SYSTEM)\"

md5.o: md5.c md5.h

nix-instantiate: nix-instantiate.in
	sed "s/@SYSTEM@/$(SYSTEM)/" < $^ > $@
	chmod +x $@

clean:
	rm -f *.o nix nix-instantiate