-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (36 loc) · 750 Bytes
/
Makefile
File metadata and controls
43 lines (36 loc) · 750 Bytes
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
OUT=tmp
SRC= \
algebra.c \
camera.c \
color.c \
image.c \
light.c \
mainIUP.c \
material.c \
object.c \
raytracing.c\
scene.c
# Configs
CC=gcc
RM=rm
MV=mv
CFLAGS=-O0 -Wall `pkg-config gl --cflags` -I /usr/include/iup -ggdb
LIBS=-liup -liupgl -liupimglib
MAKEFILE=Makefile
OBJ=$(SRC:.c=.o)
.c.o:
$(CC) -c $(CFLAGS) $<
$(OUT): $(OBJ)
$(CC) $(CFLAGS) $(LIBS) $^ -o $@
clean:
$(RM) $(OBJ) $(OUT)
depend:
if grep '^# DO NOT DELETE' $(MAKEFILE) >/dev/null; \
then \
sed -e '/^# DO NOT DELETE/,$$d' $(MAKEFILE) > \
$(MAKEFILE).$$$$ && \
$(MV) $(MAKEFILE).$$$$ $(MAKEFILE); \
fi
echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' \
>> $(MAKEFILE); \
$(CC) -M $(SRC) >> $(MAKEFILE)