-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (33 loc) · 1.05 KB
/
Makefile
File metadata and controls
45 lines (33 loc) · 1.05 KB
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
###############################################################################
#
# Makefile for ex2 - OS
#
# Student:
# erana06 - Eran Amar, ID 301786067 , eran.amar@mail.huji.ac.il
#
###############################################################################
COMPILE=g++
CFLAGS=-Wall
TAR=tar
TARFLAGS=cvf
TARNAME=ex2.tar
TARSRCS= uthreads.cpp uthreads.hh Makefile uthreads_helpers.cpp uthreads_helpers.hh
REMOVE=rm
RMFLAGS=-f
AR=ar
ARFLAGS=rcu
UTHREADSLIB=libuthreads.a
RANLIB=ranlib
all: $(UTHREADSLIB)
$(UTHREADSLIB): uthreads_helpers.o uthreads.o
$(AR) $(ARFLAGS) $(UTHREADSLIB) uthreads.o uthreads_helpers.o
$(RANLIB) $(UTHREADSLIB)
uthreads_helpers.o: uthreads.hh uthreads_helpers.hh uthreads_helpers.cpp
$(COMPILE) $(CFLAGS) -c uthreads_helpers.cpp -o uthreads_helpers.o
uthreads.o: uthreads.hh uthreads_helpers.hh uthreads.cpp
$(COMPILE) $(CFLAGS) -c uthreads.cpp -o uthreads.o
tar:
$(REMOVE) $(RMFLAGS) $(TARNAME)
$(TAR) $(TARFLAGS) $(TARNAME) $(TARSRCS)
clean:
$(REMOVE) $(RMFLAGS) *.o *~ *core $(TARNAME) $(UTHREADSLIB)