-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
41 lines (34 loc) · 1.02 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
CC=gcc
CFLAGS=-Wall
LDFLAGS=-lreadline #solo si se utiliza la librería, si no comentar esta linea
SOURCES=fase1.c fase2.c fase3.c fase4.c fase5.c fase6.c shell.c fase7.c shell_rl.c
LIBRARIES=
INCLUDES= fase1.h fase2.h fase3.h fase4.h fase5.h fase6.h fase7.h shell.h shell_rl.h
PROGRAMS=fase1 fase2 fase3 fase4 fase5 fase6 shell fase7 shell_rl
OBJS=$(SOURCES:.c=.o)
all: $(OBJS) $(PROGRAMS)
#$(PROGRAMS): $(LIBRARIES) $(INCLUDES)
# $(CC) $(LDFLAGS) $(LIBRARIES) $@.o -o $@
fase1: fase1.o
$(CC) $@.o -o $@ $(LIBRARIES)
fase2: fase2.o
$(CC) $@.o -o $@ $(LIBRARIES)
fase3: fase3.o
$(CC) $@.o -o $@ $(LIBRARIES)
fase4: fase4.o
$(CC) $@.o -o $@ $(LIBRARIES)
fase5: fase5.o
$(CC) $@.o -o $@ $(LIBRARIES)
fase6: fase6.o
$(CC) $@.o -o $@ $(LIBRARIES)
fase7: fase7.o
$(CC) $@.o -o $@ $(LDFLAGS) $(LIBRARIES)
shell: shell.o
$(CC) $@.o -o $@ $(LIBRARIES)
shell_rl: shell_rl.o
$(CC) $@.o -o $@ $(LDFLAGS) $(LIBRARIES)
%.o: %.c $(INCLUDES)
$(CC) $(CFLAGS) -o $@ -c $<
.PHONY: clean
clean:
rm -rf *.o *~ *.tmp $(PROGRAMS)