Makefile.cygwin 684 B

12345678910111213141516171819202122232425262728
  1. TARGET = sdlpal.exe
  2. HOST = i686-pc-cygwin-
  3. SOURCES = . ./adplug
  4. CFILES = $(foreach dir, $(SOURCES), $(wildcard $(dir)/*.c))
  5. CPPFILES = $(foreach dir, $(SOURCES), $(wildcard $(dir)/*.cpp))
  6. RCFILES = $(foreach dir, $(SOURCES), $(wildcard $(dir)/*.rc))
  7. OFILES = $(CFILES:.c=.o) $(CPPFILES:.cpp=.o) $(RCFILES:.rc=.o)
  8. CFLAGS = -g -Wall -O2 `sdl-config --cflags` -DCYGWIN -DPAL_CLASSIC
  9. CXXFLAGS = $(CFLAGS)
  10. LDFLAGS = `sdl-config --libs`
  11. $(TARGET): $(OFILES)
  12. $(HOST)g++ $(OFILES) -o $@ $(LDFLAGS)
  13. %.o: %.c
  14. $(HOST)gcc $(CFLAGS) -c $< -o $@
  15. %.o: %.cpp
  16. $(HOST)g++ $(CXXFLAGS) -c $< -o $@
  17. %.o: %.rc
  18. windres.exe -i $< --input-format=rc -o $@ -O coff
  19. clean:
  20. rm -f $(TARGET) $(OFILES)