Add install and clean commands to Makefile

Install to /usr/local/bin by default and prepare Makefile for
linking several different source files.
This commit is contained in:
Benjamin Althues 2012-05-22 22:06:50 +02:00
parent 9aaf8b6ca9
commit 6445aa3885

View file

@ -1,2 +1,12 @@
baps1: main.c CC = cc -Wall -Wextra
$(CC) -Wall -Wextra -lm main.c -o baps1 INST_PATH = /usr/local/bin
baps1: main.o
$(CC) -o baps1 main.o -lm
main.o: main.c
$(CC) -c main.c
install:
cp baps1 $(INST_PATH)/baps1
clean:
rm baps1 *.o