1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-14 22:03:27 +01:00
cnc-ddraw/Makefile
2024-05-10 02:43:40 +02:00

29 lines
565 B
Makefile

-include config.mk
TARGET = ddraw.dll
LDFLAGS = -Wl,--enable-stdcall-fixup -s -static -shared
CFLAGS = -Iinc -O2 -march=i486 -Wall
LIBS = -lgdi32 -lwinmm -ldbghelp -lole32
CC = i686-w64-mingw32-gcc
WINDRES ?= i686-w64-mingw32-windres
ifdef DEBUG
CFLAGS += -D _DEBUG -D _DEBUG_X
endif
SRCS := $(wildcard src/*.c) $(wildcard src/*/*.c)
OBJS := $(SRCS:c=o) res.o
.PHONY: clean all
all: $(TARGET)
%.o: %.rc
$(WINDRES) -J rc $< $@
$(TARGET): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^ exports.def $(LIBS)
clean:
$(RM) $(TARGET) $(OBJS)