winamp/Src/replicant/Wasabi/Makefile

43 lines
1.0 KiB
Makefile

MODULE_NAME := Wasabi
CPPSOURCES := api.cpp ServiceManager.cpp SysCallbacks.cpp
LIBRARY_FILENAME := lib$(MODULE_NAME).a
OUTPUT_PATH := ../build/$(MODULE_NAME)
ARCHIVE_PATH := ../build/lib
LIBRARY_FILEPATH := ../build/lib/$(LIBRARY_FILENAME)
CPPOBJS := $(patsubst %.cpp,$(OUTPUT_PATH)/%.o,$(CPPSOURCES))
CPPDEPS := $(patsubst %.o,$(OUTPUT_PATH)/%.d,$(CPPOBJS))
COBJS := $(patsubst %.c,$(OUTPUT_PATH)/%.o,$(CSOURCES))
CDEPS := $(patsubst %.o,$(OUTPUT_PATH)/%.d,$(COBJS))
OBJS := $(CPPOBJS) $(COBJS)
DEPS := $(CPPDEPS) $(CDEPS)
CFLAGS=-I..
CPPFLAGS := ${CFLAGS}
build: build-dir $(LIBRARY_FILEPATH)
build-dir:
@mkdir -p $(OUTPUT_PATH) > /dev/null 2> /dev/null
@mkdir -p $(ARCHIVE_PATH) > /dev/null 2> /dev/null
dep:
@rm ${DEPS}
$(OUTPUT_PATH)/%.o: %.cpp
#@echo Compiling $*.cpp
@$(CXX) $(CPPFLAGS) -MMD -MF $(OUTPUT_PATH)/$*.d -MT $(OUTPUT_PATH)/$*.o -c $*.cpp -o $(OUTPUT_PATH)/$*.o
$(LIBRARY_FILEPATH): ${OBJS}
$(AR) rcs $@ ${OBJS}
clean:
-rm -f ${OBJS} $(LIBRARY_FILENAME) ${DEPS}
-include $(DEPS)