X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;ds=sidebyside;f=makefile;h=26aeb075945df85d48a616c6489bbbc85cc8d458;hb=HEAD;hp=18c299ff636dcfe6d8d8d99f3c3eaba095ccb46b;hpb=89732d399de9007aaf2894b0c637e8cfb9ed47ac;p=sped.git diff --git a/makefile b/makefile index 18c299f..26aeb07 100644 --- a/makefile +++ b/makefile @@ -2,16 +2,25 @@ CC=gcc CFLAGS=-m32 -no-pie ASM=nasm ASMFLAGS=-f elf32 -g +PREFIX=/usr/bin -.PHONY: clean +.PHONY: clean install uninstall make: sped %.o: %.asm $(ASM) $(ASMFLAGS) -o $@ $^ -sped: sped.o fileutils.o repl.o +sped: sped.o fileutils.o repl.o utils.o $(CC) $(CFLAGS) -o $@ $^ +install: sped + mkdir -p $(PREFIX) + cp -f sped $(PREFIX) + chmod 775 $(PREFIX)/sped + +uninstall: + rm -f $(PREFIX)/sped + clean: rm sped *.o