about summary refs log blame commit diff
path: root/src/Makefile
blob: 3398b8f3af72e6a59d2910a575fac00d0aa1f7a5 (plain) (tree)
1
2
3
4
5
6



                                
                
                                          







                                                       






                                             
all: nix nix-instantiate

SYSTEM = $(shell ./config.guess)

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

%.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