Makefile 939 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. OBJ = main.o secure_input.o display_progress.o md5.o u3_commands.o u3_error.o
  2. OBJ_SG = u3_scsi_sg.o
  3. OBJ_USB = u3_scsi_usb.o
  4. OBJ_DEBUG = u3_scsi_debug.o
  5. CFLAGS += -g -Wall
  6. .PHONY: all clean
  7. all: u3_tool u3_tool_sg
  8. u3_tool: $(OBJ) $(OBJ_USB)
  9. $(CC) -o u3_tool $(OBJ) $(OBJ_USB) $(LDFLAGS) -lusb
  10. u3_tool_sg: $(OBJ) $(OBJ_SG)
  11. $(CC) -o u3_tool_sg $(OBJ) $(OBJ_SG) $(LDFLAGS)
  12. u3_tool_debug: $(OBJ) $(OBJ_DEBUG)
  13. $(CC) -o u3_tool_debug $(OBJ) $(OBJ_DEBUG) $(LDFLAGS)
  14. main.o: main.c u3.h
  15. secure_input.o: secure_input.c secure_input.h
  16. display_progress.o: display_progress.c display_progress.h
  17. md5.o: md5.c md5.h
  18. u3_commands.o: u3_commands.c u3_commands.h u3.h
  19. u3_error.o: u3_error.c u3_error.h u3.h
  20. u3_scsi_sg.o: u3_scsi_sg.c u3_scsi.h sg_err.h u3.h
  21. u3_scsi_usb.o: u3_scsi_usb.c u3_scsi.h u3.h
  22. u3_scsi_debug.o: u3_scsi_debug.c u3_scsi.h u3.h
  23. clean:
  24. rm -f u3_tool u3_tool_sg u3_tool_debug $(OBJ) $(OBJ_SG) $(OBJ_USB) $(OBJ_DEBUG)