1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00
cnc-ddraw/Makefile

26 lines
637 B
Makefile
Raw Permalink Normal View History

2019-04-08 04:16:20 +02:00
-include config.mk
2024-12-06 05:35:12 +01:00
TARGET ?= ddraw.dll
LDFLAGS ?= -Wl,--enable-stdcall-fixup -s -static -shared
CFLAGS ?= -Iinc -O2 -Wall -std=c99 -Wno-incompatible-pointer-types
2024-12-06 05:58:32 +01:00
LIBS = -lgdi32 -lwinmm -lole32 -lmsimg32 -lpsapi
2024-12-06 05:35:12 +01:00
CC = i686-w64-mingw32-gcc
WINDRES ?= i686-w64-mingw32-windres
SRCS := $(wildcard src/*.c) $(wildcard src/*/*.c) ddraw.rc
OBJS := $(addsuffix .o, $(basename $(SRCS)))
.PHONY: clean all
all: $(TARGET)
%.o: %.rc
$(WINDRES) -J rc $< $@ || windres -J rc $< $@
$(TARGET): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^ ddraw.def $(LIBS)
2010-10-10 19:41:47 +03:00
clean:
2024-12-06 05:35:12 +01:00
$(RM) $(TARGET) $(OBJS) || del $(TARGET) $(subst /,\\,$(OBJS))