Makefile 888 B

1234567891011121314151617181920212223242526
  1. # General makefile for generic unix & linux platforms
  2. TARGET = sdlpal
  3. HOST =
  4. CFILES = $(wildcard ../adplug/*.c) $(wildcard ../libmad/*.c) $(wildcard ../liboggvorbis/src/*.c) $(wildcard ../*.c)
  5. CPPFILES = $(wildcard ../adplug/*.cpp) $(wildcard ../*.cpp) $(wildcard ./*.cpp)
  6. OBJFILES = $(CFILES:.c=.o) $(CPPFILES:.cpp=.o)
  7. CCFLAGS = `sdl2-config --cflags` -g -Wall -O2 -fno-strict-aliasing -I../ -I../liboggvorbis/include -I../liboggvorbis/src -DPAL_CLASSIC -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)