emu48-mirror/sources/GCCPatch/Makefile
2024-03-19 22:38:33 +01:00

118 lines
3.2 KiB
Makefile

PRJ=Emu48gcc
CC=gcc
LD=gcc
# This is to make GCC not bitch at things M$ allows
CFLAGS= -Wall -Wno-missing-braces -Wno-format -Wno-uninitialized -O3
# Things we need around to compile successfully
DEFINES= -DIDC_STATIC=-1
LDFLAGS= -s -mwindows
TARGET=$(PRJ).exe
#
# Warning.. my own resources because WINDRES doesn't understand
# the FONT definition for dialogs produced by the M$ tools
#
RSRC=$(PRJ).rc
RSRCOBJ=$(PRJ).o
OBJS=cursor.o disasm.o display.o debugger.o ddeserv.o \
emu48.o engine.o external.o fetch.o files.o i28f160.o keyboard.o \
kml.o mops.o opcodes.o rpl.o serial.o settings.o timer.o \
$(RSRCOBJ)
LIBS=-lwinmm -lcomctl32
all: $(TARGET)
rebuild: tidy $(TARGET)
tidy: cleanemacs cleanobj cleanexe
cleanemacs:
-rm -f *~
cleanobj:
-rm -f $(OBJS)
cleanexe:
-rm -f $(TARGET)
cursor.o: cursor.c pch.h emu48.h
$(CC) $(CFLAGS) $(DEFINES) -c -o cursor.o cursor.c
ddeserv.o: ddeserv.c pch.h emu48.h types.h
$(CC) $(CFLAGS) $(DEFINES) -c -o ddeserv.o ddeserv.c
debugger.o: debugger.c pch.h resource.h emu48.h \
types.h opcodes.h ops.h color.h debugger.h
$(CC) $(CFLAGS) $(DEFINES) -c -o debugger.o debugger.c
disasm.o: disasm.c pch.h emu48.h types.h
$(CC) $(CFLAGS) $(DEFINES) -c -o disasm.o disasm.c
display.o: display.c pch.h resource.h emu48.h \
types.h io.h kml.h
$(CC) $(CFLAGS) $(DEFINES) -c -o display.o display.c
emu48.o: emu48.c pch.h resource.h emu48.h types.h \
io.h kml.h debugger.h
$(CC) $(CFLAGS) $(DEFINES) -c -o emu48.o emu48.c
engine.o: engine.c pch.h emu48.h types.h opcodes.h \
io.h debugger.h ops.h
$(CC) $(CFLAGS) $(DEFINES) -c -o engine.o engine.c
external.o: external.c pch.h emu48.h types.h
$(CC) $(CFLAGS) $(DEFINES) -c -o external.o external.c
fetch.o: fetch.c pch.h opcodes.h
$(CC) $(CFLAGS) $(DEFINES) -c -o fetch.o fetch.c
files.o: files.c pch.h emu48.h types.h io.h \
kml.h i28f160.h debugger.h
$(CC) $(CFLAGS) $(DEFINES) -c -o files.o files.c
i28f160.o: i28f160.c pch.h emu48.h types.h i28f160.h
$(CC) $(CFLAGS) $(DEFINES) -c -o i28f160.o i28f160.c
keyboard.o: keyboard.c pch.h emu48.h types.h io.h
$(CC) $(CFLAGS) $(DEFINES) -c -o keyboard.o keyboard.c
kml.o: kml.c pch.h resource.h emu48.h types.h kml.h
$(CC) $(CFLAGS) $(DEFINES) -c -o kml.o kml.c
mops.o: mops.c pch.h emu48.h types.h opcodes.h io.h \
i28f160.h
$(CC) $(CFLAGS) $(DEFINES) -c -o mops.o mops.c
opcodes.o: opcodes.c pch.h emu48.h types.h opcodes.h \
io.h ops.h
$(CC) $(CFLAGS) $(DEFINES) -c -o opcodes.o opcodes.c
# pch.o: pch.c pch.h
# $(CC) $(CFLAGS) $(DEFINES) -c -o pch.o pch.c
rpl.o: rpl.c pch.h emu48.h types.h io.h
$(CC) $(CFLAGS) $(DEFINES) -c -o rpl.o rpl.c
serial.o: serial.c pch.h emu48.h types.h io.h
$(CC) $(CFLAGS) $(DEFINES) -c -o serial.o serial.c
settings.o: settings.c pch.h emu48.h types.h i28f160.h
$(CC) $(CFLAGS) $(DEFINES) -c -o settings.o settings.c
timer.o: timer.c pch.h emu48.h types.h io.h
$(CC) $(CFLAGS) $(DEFINES) -c -o timer.o timer.c
$(RSRCOBJ): $(RSRC) resource.h emu48.ico dbgtool.bmp checkbox.bmp Emu48.xml
windres $(DEFINES) -i $(RSRC) -o $(RSRCOBJ)
$(TARGET): $(OBJS)
$(LD) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS)