forked from hmage/megactl
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
54 lines (41 loc) · 1.66 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
DESTDIR:=
PREFIX:= /usr
BINDIR:= $(PREFIX)/bin
METAINFODIR:= $(PREFIX)/share/metainfo/
INSTALL= install
SRCS= megactl.c adapter.c megaioctl.c megatrace.c callinfo.c dumpbytes.c logpage.c ntrim.c
INC= -I./schily -Iincludes-hack
HDRS= mega.h adapter.h megaioctl.h callinfo.h logpage.h dumpbytes.h
CPPFLAGS+=
CFLAGS+= -g -Wall $(INC) $(ARCH) $(CPPFLAGS)
LDFLAGS+= -g $(ARCH)
PROGRAMS= megactl megasasctl
all: $(PROGRAMS)
megatrace: megatrace.o callinfo.o dumpbytes.o
$(CC) $(LDFLAGS) -o $@ megatrace.o callinfo.o dumpbytes.o
megactl: megactl.o adapter.o dumpbytes.o megaioctl.o logpage.o ntrim.o
$(CC) $(LDFLAGS) -o $@ megactl.o adapter.o dumpbytes.o megaioctl.o logpage.o ntrim.o
megasasctl: megasasctl.o adapter.o dumpbytes.o megaioctl.o logpage.o ntrim.o
$(CC) $(LDFLAGS) -o $@ megasasctl.o adapter.o dumpbytes.o megaioctl.o logpage.o ntrim.o
megasasctl.o: megactl.c
$(CC) $(CFLAGS) -c -o $@ -DMEGA_SAS_CTL megactl.c
%.o: Makefile.bak %.c
$(CC) $(CFLAGS) -c -o $@ $*.c
install: $(PROGRAMS)
$(INSTALL) -d $(DESTDIR)$(BINDIR)/
$(INSTALL) $(PROGRAMS) $(DESTDIR)$(BINDIR)
$(INSTALL) -d $(DESTDIR)$(METAINFODIR)/
$(INSTALL) -m644 megactl.metainfo.xml $(DESTDIR)$(METAINFODIR)/
clean:
$(RM) $(PROGRAMS) *.o
depend:
makedepend -- $(CFLAGS) -- $(SRCS)
megactl.o: mega.h adapter.h megaioctl.h logpage.h dumpbytes.h
megasasctl.o: mega.h adapter.h megaioctl.h logpage.h dumpbytes.h
adapter.o: mega.h megaioctl.h logpage.h ntrim.h
megaioctl.o: mega.h megaioctl.h logpage.h
megatrace.o: mega.h megaioctl.h logpage.h callinfo.h dumpbytes.h
callinfo.o: callinfo.h
logpage.o: mega.h megaioctl.h logpage.h ntrim.h dumpbytes.h
ntrim.o: ntrim.h
# DO NOT DELETE