forked from intel/numatop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (29 loc) · 981 Bytes
/
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
PREFIXDIR = /usr/local
BINDIR = /bin
MANDIR = /usr/share/man/man8
PROG = numatop
CC = gcc
LD = gcc
CFLAGS = -g -Wall -O2
LDFLAGS = -g
LDLIBS = -lncurses -lpthread -lnuma
COMMON_OBJS = cmd.o disp.o lwp.o numatop.o page.o perf.o \
proc.o reg.o util.o win.o
OS_OBJS = os_cmd.o os_perf.o os_win.o node.o map.o \
os_util.o plat.o pfwrapper.o sym.o os_page.o
INTEL_OBJS = wsm.o snb.o nhm.o
all: $(PROG)
$(PROG): $(COMMON_OBJS) $(OS_OBJS) $(INTEL_OBJS)
$(LD) $(LDFLAGS) -o $@ $(COMMON_OBJS) $(OS_OBJS) $(INTEL_OBJS) $(LDLIBS)
%.o: ./common/%.c ./common/include/*.h ./common/include/os/*.h
$(CC) $(CFLAGS) -o $@ -c $<
%.o: ./common/os/%.c ./common/include/*.h ./common/include/os/*.h
$(CC) $(CFLAGS) -o $@ -c $<
%.o: ./intel/%.c ./intel/include/*.h
$(CC) $(CFLAGS) -o $@ -c $<
install: $(PROG)
install -m 0755 $(PROG) $(PREFIXDIR)$(BINDIR)/
gzip -c numatop.8 > numatop.8.gz
mv -f numatop.8.gz $(MANDIR)/
clean:
rm -rf *.o $(PROG)