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:
parent
9aaf8b6ca9
commit
6445aa3885
1 changed files with 12 additions and 2 deletions
14
src/Makefile
14
src/Makefile
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue