# This Makefile will build the MinGW Win32 application. HEADERS = include/callbacks.h include/resource.h OBJS = obj/winmain.o obj/callbacks.o obj/resource.o INCLUDE_DIRS = -I.\include WARNS = -Wall RC = windres CC = gcc LDFLAGS = -s -lcomctl32 -Wl,--subsystem,windows -Wl,--subsystem,console LSFLAGS = -s -lcomctl32 -static-libgcc -static-libstdc++ -Wl,-subsystem,windows -Wl,-subsystem,console # -Wl,--subsystem,windows for graphic output to a window # -Wl,--subsystem,console for data output to console # Compile ANSI build only if CHARSET=ANSI ifeq (${CHARSET}, ANSI) CFLAGS= -O3 -std=c99 -D _WIN32_IE=0x0500 -D WINVER=0x500 ${WARNS} else CFLAGS= -O3 -std=c99 -D UNICODE -D _UNICODE -D _WIN32_IE=0x0500 -D WINVER=0x500 ${WARNS} endif all: Win32App.exe Win32App.exe: ${OBJS} ${CC} -mwindows -o "$@" ${OBJS} ${LSFLAGS} # added -mwindows for GDI32 library # a cleaner link to the Win32 graphics libraries clean: rm obj/*.o rm Win32App.exe obj/%.o: src/%.c ${HEADERS} ${CC} ${CFLAGS} ${INCLUDE_DIRS} -c $< -o $@ obj/resource.o: res/resource.rc res/Application.manifest res/Application.ico include/resource.h ${RC} -I.\include -I.\res -i $< -o $@ ###################################################################### # modify above file to use TARGET instead of magic name. # TARGET = Fractal3a # all: $(TARGET) # $(TARGET): $(TARGET).c # $(CC) $(CFLAGS) -o $(TARGET) $(TARGET).c # clean: $(RM) $(TARGET)