Makefile 993 B

1234567891011121314151617181920212223242526
  1. # General makefile for generic unix & linux platforms
  2. TARGET = sdlpal
  3. HOST =
  4. CFILES = $(wildcard ../src/adplug/*.c) $(wildcard ../src/libmad/*.c) $(wildcard ../src/liboggvorbis/src/*.c) $(wildcard ../src/*.c)
  5. CPPFILES = $(wildcard ../src/adplug/*.cpp) $(wildcard ../src/*.cpp) $(wildcard ./*.cpp)
  6. OBJFILES = $(CFILES:.c=.o) $(CPPFILES:.cpp=.o)
  7. CCFLAGS = `sdl2-config --cflags` -g -Wall -O2 -fno-strict-aliasing -I. -I../src -I../src/liboggvorbis/include -I../src/liboggvorbis/src -DPAL_HAS_PLATFORM_SPECIFIC_UTILS
  8. CXXFLAGS = $(CCFLAGS) -std=c++11 `fltk-config --cxxflags`
  9. CFLAGS = $(CCFLAGS) -std=gnu99 `fltk-config --cflags`
  10. LDFLAGS = `sdl2-config --libs` `fltk-config --ldflags` -lstdc++ -lm
  11. $(TARGET): $(OBJFILES)
  12. $(HOST)g++ $(OBJFILES) -o $(TARGET) $(LDFLAGS)
  13. %.o: %.c
  14. $(HOST)gcc $(CFLAGS) -c $< -o $@
  15. %.o: %.cpp
  16. $(HOST)gcc $(CXXFLAGS) -c $< -o $@
  17. clean:
  18. -rm -f $(TARGET) *.o ../src/*.o ../src/adplug/*.o ../src/libmad/*.o ../src/liboggvorbis/src/*.o