Makefile 1.1 KB

123456789101112131415161718192021222324252627282930
  1. # Makefile for win32 platforms with mingw
  2. TARGET = sdlpal.exe
  3. HOST =
  4. CFILES = $(wildcard ../adplug/*.c) $(wildcard ../libmad/*.c) $(wildcard ../liboggvorbis/src/*.c) $(wildcard ../*.c) ../native_midi/native_midi_win32.c ../native_midi/native_midi_common.c
  5. CPPFILES = $(wildcard ../adplug/*.cpp) $(wildcard ../*.cpp) $(wildcard ./*.cpp)
  6. OBJFILES = $(CFILES:.c=.o) $(CPPFILES:.cpp=.o) sdlpal.o
  7. override CCFLAGS += `sdl2-config --cflags` -msse -Wall -O2 -fno-strict-aliasing -I../ -I../liboggvorbis/include -I../liboggvorbis/src -DPAL_HAS_PLATFORM_SPECIFIC_UTILS
  8. CXXFLAGS = $(CCFLAGS) -std=c++11
  9. CFLAGS = $(CCFLAGS) -std=gnu99
  10. LDFLAGS = `sdl2-config --libs` -lm -lwinmm -lole32 -loleaut32 -limm32 -lcomctl32 -luuid -ldxguid -lversion -static -static-libgcc -static-libstdc++
  11. $(TARGET): $(OBJFILES)
  12. $(HOST)g++ $(OBJFILES) -o $(TARGET) $(LDFLAGS)
  13. $(HOST)strip $(TARGET)
  14. %.o: %.c
  15. $(HOST)gcc $(CFLAGS) -c $< -o $@
  16. %.o: %.cpp
  17. $(HOST)g++ $(CXXFLAGS) -c $< -o $@
  18. %.o: %.rc
  19. windres -i $< -o $@
  20. clean:
  21. -rm -f $(TARGET) *.o ../*.o ../adplug/*.o ../libmad/*.o ../liboggvorbis/src/*.o