1 # change for your CPU and compiler
3 # note that mysql_config is braindamaged ;-)
5 CFLAGS=-O6 -Wall -I/usr/include/mysql/
7 LIBS=-L/usr/local/lib/mysql -lmysqlclient -lnsl -lm -lz -lcrypt
11 # *** end of configuration ***
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
17 all: nbtscanner outputfile
19 $(CC) -o nbtscanner $(OBJSN) $(LIBS)
21 $(CC) -o outputfile $(OBJSO) $(LIBS)
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
29 mysql_interface.o: mysql_interface.c mysql_interface.h
30 $(CC) $(CFLAGS) -c mysql_interface.c
32 configfile.o: configfile.c configfile.h nbtscanner.h
33 $(CC) $(CFLAGS) -c configfile.c
35 nmb.o: nmb.c nmb.h packet.h byteorder.h util.h
36 $(CC) $(CFLAGS) -c nmb.c
38 stats.o: stats.c stats.h configfile.h util.h
39 $(CC) $(CFLAGS) -c stats.c
41 socket.o: socket.c socket.h nmb.h packet.h
42 $(CC) $(CFLAGS) -c socket.c
45 $(CC) $(CFLAGS) -c util.c
47 id_list.o: id_list.c id_list.h configfile.h util.h
48 $(CC) $(CFLAGS) -c id_list.c
52 rm -f $(OBJSO) $(OBJSN) nbtscanner outputfile