Makefile 604 B

123456789101112131415161718192021222324
  1. TARGET = sdlpal.dge
  2. HOST = mipsel-linux-uclibc-
  3. SOURCES = ../src ../src/adplug
  4. CFILES = $(foreach dir, $(SOURCES), $(wildcard $(dir)/*.c))
  5. CPPFILES = $(foreach dir, $(SOURCES), $(wildcard $(dir)/*.cpp))
  6. OFILES = $(CFILES:.c=.o) $(CPPFILES:.cpp=.o)
  7. CFLAGS = -g -Wall -O2 `sdl-config --cflags` -DDINGOO -DPAL_CLASSIC -DPAL_HAS_PLATFORM_SPECIFIC_UTILS -I. -I../src
  8. CXXFLAGS = $(CFLAGS)
  9. LDFLAGS = `sdl-config --libs`
  10. $(TARGET): $(OFILES)
  11. $(HOST)g++ $(OFILES) -o $@ $(LDFLAGS)
  12. %.o: %.c
  13. $(HOST)gcc $(CFLAGS) -c $< -o $@
  14. %.o: %.cpp
  15. $(HOST)g++ $(CXXFLAGS) -c $< -o $@
  16. clean:
  17. rm -f $(TARGET) $(OFILES)