Commit 37a7cca1 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Update Makefile

parent b2e0d50b
Pipeline #643 failed with stages
in 43 seconds
......@@ -131,20 +131,36 @@ else
CFLAGS += -std=gnu++98
endif
OBJOUT = -o
LINKOUT = -o
ifneq (,$(findstring msvc,$(platform)))
OBJOUT = -Fo
LINKOUT = -out:
ifeq ($(STATIC_LINKING),1)
LD ?= lib.exe
STATIC_LINKING=0
else
LD = link.exe
endif
else
LD = $(CXX)
endif
all: $(TARGET)
$(TARGET): $(OBJECTS)
ifeq ($(STATIC_LINKING), 1)
$(AR) rcs $@ $(OBJECTS)
else
$(CXX) $(fpic) $(SHARED) $(INCLUDES) -o $@ $(OBJECTS) $(LDFLAGS)
$(LD) $(fpic) $(SHARED) $(LINKOUT)$@ $(OBJECTS) $(LDFLAGS)
endif
%.o: %.cpp
$(CXX) $(CFLAGS) $(fpic) -c -o $@ $<
$(CXX) $(INCLUDES) $(CFLAGS) $(fpic) -c $(OBJOUT)$@ $<
%.o: %.c
$(CC) $(CFLAGS) $(fpic) -c -o $@ $<
$(CC) $(INCLUDES) $(CFLAGS) $(fpic) -c $(OBJOUT)$@ $<
clean:
rm -f *.so *.o
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment