1 # change for your CPU and compiler
3 # note that mysql_config is braindamaged ;-)
5 CFLAGS=-g -Wall "`mysql_config --cflags | tr -d \'`"
7 LIBS=`mysql_config --libs | tr -d \'` # '`
11 # *** end of configuration ***
14 # due to some icky programming, we will have to add all the .o files everywhere.
16 OBJSN=nbtscanner.o mysql_interface.o configfile.o nmb.o stats.o socket.o util.o id_list.o
17 OBJSO=outputfile.o mysql_interface.o configfile.o nmb.o stats.o socket.o util.o id_list.o
19 all: nbtscanner outputfile
21 $(CC) -o nbtscanner $(OBJSN) $(LIBS)
23 $(CC) -o outputfile $(OBJSO) $(LIBS)
25 nbtscanner.o: nbtscanner.c nbtscanner.h configfile.h mysql_interface.h nmb.h socket.h stats.h \
26 packet.h byteorder.h util.h id_list.h
27 $(CC) $(CFLAGS) -c nbtscanner.c
28 outputfile.o: outputfile.c configfile.h mysql_interface.h
29 $(CC) $(CFLAGS) -c outputfile.c
31 mysql_interface.o: mysql_interface.c mysql_interface.h
32 $(CC) $(CFLAGS) -c mysql_interface.c
34 configfile.o: configfile.c configfile.h nbtscanner.h
35 $(CC) $(CFLAGS) -c configfile.c
37 nmb.o: nmb.c nmb.h packet.h byteorder.h util.h
38 $(CC) $(CFLAGS) -c nmb.c
40 stats.o: stats.c stats.h configfile.h util.h
41 $(CC) $(CFLAGS) -c stats.c
43 socket.o: socket.c socket.h nmb.h packet.h
44 $(CC) $(CFLAGS) -c socket.c
47 $(CC) $(CFLAGS) -c util.c
49 id_list.o: id_list.c id_list.h configfile.h util.h
50 $(CC) $(CFLAGS) -c id_list.c
54 rm -f $(OBJSO) $(OBJSN) nbtscanner outputfile