Makefile 560B

12345678910111213141516171819202122232425262728293031323334353637
  1. ## Makefile for use with gnu make and MinGW32 gnu gcc
  2. TARGET=wol
  3. CC=gcc
  4. LD=gcc
  5. CPPFLAGS= -Wall -O2
  6. LFLAGS= -s
  7. #LIBFILES= -lwsock
  8. #LIBPATH= -L/usr/lib
  9. ICON=$(TARGET).ico
  10. OBJS=$(TARGET).o
  11. RESF=$(TARGET).rc
  12. #RESNAME=$(TARGET).res
  13. #BINNAME=$(TARGET).exe
  14. BINNAME=$(TARGET)
  15. $(BINNAME): $(OBJS) $(RESNAME)
  16. $(LD) $(LFLAGS) -o $@ $^ $(LIBPATH) $(LIBFILES)
  17. %.res:%.rc
  18. windres -I rc -O coff -i $< -o $@
  19. %.rc:Makefile
  20. @echo 100 ICON "$(ICON)" > $@
  21. dist:$(BINNAME)
  22. rm -f $(OBJS) $(RESNAME) $(RESF)
  23. clean:
  24. rm -f $(OBJS) $(RESNAME) $(RESF)
  25. rm -f $(BINNAME)