-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (32 loc) · 793 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# make [ | all | debug | submit | depend | clean ]
# .h header files
HDR = args.h
# .c source files
SRC = projekt2.c args.c
# executable name
EXE = barbers
# basename for the submission file
SUB = xpacne00# NO TRAILING SPACES
# compiler
CC = gcc
#CC = i486-mingw32-gcc
CFLAGS = -std=gnu99 -W -Wall -Wextra -Werror -pedantic #-lm
OBJ = ${SRC:.c=.o}
all : ${EXE}
debug : ${OBJ}
${CC} ${CFLAGS} -g -o ${EXE} ${OBJ}
#-DDEBUG
${EXE} : ${OBJ}
${CC} ${CFLAGS} -O2 -o $@ ${OBJ}
submit :
#tar cvzf ${SUB}.tar.gz ${SRC} ${HDR} makefile
zip -q ${SUB}.zip -9 ${SRC} ${HDR} Makefile
depends depend :
${CC} -E -MM ${SRC} > depends
clean :
rm -f ${OBJ} ${EXE} ${SUB}.tar.gz *~
#rm -f ${OBJ} ${EXE} ${SUB}.tar.gz *~ depends
.SUFFIXES : .o .c
.c.o :
${CC} ${CFLAGS} -c $<
#include depends