-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
64 lines (52 loc) · 1.21 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
CC=gcc
CCOPTS=--std=gnu99 -Wall -g -O0
AR=ar
HEADERS=disastrOS.h\
disastrOS_constants.h\
disastrOS_descriptor.h\
disastrOS_globals.h\
disastrOS_pcb.h\
disastrOS_resource.h\
disastrOS_syscalls.h\
disastrOS_timer.h\
disastrOS_mq.h\
linked_list.h\
pool_allocator.h\
OBJS=pool_allocator.o\
linked_list.o\
disastrOS_timer.o\
disastrOS_pcb.o\
disastrOS_resource.o\
disastrOS_descriptor.o\
disastrOS.o\
disastrOS_fork.o\
disastrOS_wait.o\
disastrOS_spawn.o\
disastrOS_exit.o\
disastrOS_shutdown.o\
disastrOS_schedule.o\
disastrOS_preempt.o\
disastrOS_sleep.o\
disastrOS_open_resource.o\
disastrOS_close_resource.o\
disastrOS_destroy_resource.o\
disastrOS_mq.o\
disastrOS_close_mq.o\
disastrOS_open_mq.o\
disastrOS_write_mq.o\
disastrOS_read_mq.o\
disastrOS_destroy_mq.o\
LIBS=libdisastrOS.a
BINS=disastrOS_test
#disastros_test
.phony: clean all
all: $(LIBS) $(BINS)
%.o: %.c $(HEADERS)
$(CC) $(CCOPTS) -c -o $@ $<
libdisastrOS.a: $(OBJS) $(HEADERS)
$(AR) -rcs $@ $^
$(RM) $(OBJS)
disastrOS_test: disastrOS_test.c $(LIBS)
$(CC) $(CCOPTS) -g -o $@ $^
clean:
rm -rf *.o *~ $(LIBS) $(BINS)