]> git.sesse.net Git - nbtscanner/blob - Makefile
Import nbtscanner 0.2.0.
[nbtscanner] / Makefile
1 # change for your CPU and compiler
2
3 # note that mysql_config is braindamaged ;-)
4 CC=gcc
5 CFLAGS=-O6 -Wall -I/usr/include/mysql/
6
7 LIBS=-L/usr/local/lib/mysql -lmysqlclient -lnsl -lm   -lz -lcrypt
8 LDFLAGS=
9
10 #
11 # *** end of configuration ***
12 #
13
14 OBJSN=nbtscanner.o mysql_interface.o configfile.o nmb.o stats.o socket.o util.o id_list.o
15 OBJSO=outputfile.o mysql_interface.o configfile.o
16
17 all: nbtscanner outputfile
18 nbtscanner: $(OBJSN)
19         $(CC) -o nbtscanner $(OBJSN) $(LIBS)
20 outputfile: $(OBJSO)
21         $(CC) -o outputfile $(OBJSO) $(LIBS)
22
23 nbtscanner.o: nbtscanner.c nbtscanner.h configfile.h mysql_interface.h nmb.h socket.h stats.h \
24               packet.h byteorder.h util.h id_list.h
25         $(CC) $(CFLAGS) -c nbtscanner.c
26 outputfile.o: outputfile.c configfile.h mysql_interface.h
27         $(CC) $(CFLAGS) -c outputfile.c
28
29 mysql_interface.o: mysql_interface.c mysql_interface.h
30         $(CC) $(CFLAGS) -c mysql_interface.c
31
32 configfile.o: configfile.c configfile.h nbtscanner.h
33         $(CC) $(CFLAGS) -c configfile.c
34
35 nmb.o: nmb.c nmb.h packet.h byteorder.h util.h
36         $(CC) $(CFLAGS) -c nmb.c
37
38 stats.o: stats.c stats.h configfile.h util.h 
39         $(CC) $(CFLAGS) -c stats.c
40
41 socket.o: socket.c socket.h nmb.h packet.h
42         $(CC) $(CFLAGS) -c socket.c
43
44 util.o: util.c util.h
45         $(CC) $(CFLAGS) -c util.c
46
47 id_list.o: id_list.c id_list.h configfile.h util.h
48         $(CC) $(CFLAGS) -c id_list.c
49
50 .PHONY: clean
51 clean:
52         rm -f $(OBJSO) $(OBJSN) nbtscanner outputfile