diff options
-rw-r--r-- | Makefile | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -287,6 +287,7 @@ CXXFLAGS += $(FLAGS) CFLAGS += $(FLAGS) ifneq (,$(findstring msvc,$(platform))) + LIBM = OBJOUT = -Fo LINKOUT = -out: LD = link.exe @@ -296,6 +297,13 @@ else LD = $(CC) endif +%.o: %.cpp + $(CXX) -c $(OBJOUT)$@ $< $(CXXFLAGS) + +%.o: %.c + $(CC) -c $(OBJOUT)$@ $< $(CFLAGS) + + ifeq ($(platform), theos_ios) COMMON_FLAGS := -DIOS $(COMMON_DEFINES) $(INCFLAGS) -I$(THEOS_INCLUDE_PATH) -Wno-error $(LIBRARY_NAME)_CFLAGS += $(COMMON_FLAGS) $(CFLAGS) @@ -307,15 +315,9 @@ $(TARGET): $(OBJECTS) ifeq ($(STATIC_LINKING), 1) $(AR) rcs $@ $(OBJECTS) else - $(CC) -o $@ $^ $(LDFLAGS) + $(LD) $(LINKOUT)$@ $^ $(LDFLAGS) endif -%.o: %.cpp - $(CXX) -c $(OBJOUT)$@ $< $(CXXFLAGS) - -%.o: %.c - $(CC) -c $(OBJOUT)$@ $< $(CFLAGS) - clean: rm -f $(TARGET) $(OBJECTS) |