all: 01-find_all_devices 02-list_device_addresses 03-find_local_interface 04-basic_packet_capture 05-ethernet_header_details 06-send_packet 07-reading_pcap_file

01-find_all_devices: 01-find_all_devices.c
	gcc -Wall -lpcap -o 01-find_all_devices 01-find_all_devices.c

02-list_device_addresses: 02-list_device_addresses.c
	gcc -Wall -lpcap -o 02-list_device_addresses 02-list_device_addresses.c

03-find_local_interface: 03-find_local_interface.c
	gcc -Wall -lpcap -o 03-find_local_interface 03-find_local_interface.c

04-basic_packet_capture: 04-basic_packet_capture.c
	gcc -Wall -lpcap -o 04-basic_packet_capture 04-basic_packet_capture.c

05-ethernet_header_details: 05-ethernet_header_details.c
	gcc -Wall -lpcap -o 05-ethernet_header_details 05-ethernet_header_details.c

06-send_packet: 06-send_packet.c
	gcc -Wall -o 06-send_packet 06-send_packet.c /usr/lib64/libnet.a

07-reading_pcap_file: 07-reading_pcap_file.c
	gcc -Wall -lpcap -o 07-reading_pcap_file 07-reading_pcap_file.c

clean_all:
	rm -f 01-find_all_devices 02-list_device_addresses 03-find_local_interface 04-basic_packet_capture 05-ethernet_header_details 06-send_packet 07-reading_pcap_file
