-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (48 loc) · 1.06 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#OBJS = main.obj io.obj
#CC = bcc
#MODEL = s
#CFLAGS = –m$(MODEL)
#project.exe : $(OBJS)
# tlink c0$(MODEL) $(OBJS), $(.TARGET),, c$(MODEL) /Lf:\bc\lib
#$(OBJS) : incl.h
#
# The Compiler
#
CC = gcc
LD = ${CC}
SMR = /usr/local/smr
CFLAGS = -Wall -O2 -I${SMR}/include
LDFLAGS = -L${SMR}/lib
LIBS = -lm /usr/local/smr/lib/librhd.a
#
# Our program files
#
PROG = smr
HDRS =
FILE = main.c
SRCS = ${wildcard src/*.c src/*/*.c}
OBJS = ${SRCS:.c=.o}
HDRS2 = ${wildcard src/*.h src/*/*.h}
#%.o : %.c
#%src/*/*.o : %src/*/*.c
# ${CC} ${CFLAGS} –c ${.SOURCE}
all: ${PROG}
#%.o : %src/*. %src/*/*.c
#${PROG}: ${OBJS}
# ${CC} ${OBJS} -o smr ${LDFLAGS} ${LIBS}
#
#${OBJS} : ${SRCS} ${HDRS2}
# echo ${OBJS}
# ${LD} -c ${CFLAGS} ${LDFLAGS} ${SRCS} ${HDRS2}
${PROG}: ${SRCS} ${HDRS2}
rm -f src/*.gch src/*/*.gch
${CC} -c ${CFLAGS} ${LDFLAGS} ${SRCS} ${HDRS2}
${LD} *.o -o smr ${LDFLAGS} ${LIBS}
rm -f src/*.gch src/*/*.gch
#${OBJS} :
# echo ${OBJS}
linker:
echo "win"
clean:
rm -f ${wildcard *.o} ${PROG}
${OBJS}: ${HDRS} Makefile