2024-03-19 22:37:03 +01:00
|
|
|
PRJ=Emu48gcc
|
|
|
|
|
|
|
|
CC=gcc
|
|
|
|
LD=gcc
|
|
|
|
|
|
|
|
# This is to make GCC not bitch at things M$ allows
|
|
|
|
|
2024-03-19 23:35:29 +01:00
|
|
|
CFLAGS= -Wall -Wno-missing-braces -Wno-format -Wno-uninitialized \
|
|
|
|
-Wno-strict-aliasing -Wno-unused-function -O3
|
2024-03-19 22:37:03 +01:00
|
|
|
|
2024-03-19 23:35:29 +01:00
|
|
|
DEFINES= -DIDC_STATIC=-1 \
|
|
|
|
-DREGISTRY
|
2024-03-19 22:37:03 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2024-03-19 23:35:30 +01:00
|
|
|
OBJS=cursor.o ddeserv.o debugger.o disasm.o dismem.o display.o disrpl.o \
|
2024-03-19 22:37:03 +01:00
|
|
|
emu48.o engine.o external.o fetch.o files.o i28f160.o keyboard.o \
|
2024-03-19 23:35:30 +01:00
|
|
|
keymacro.o kml.o lowbat.o mru.o mops.o opcodes.o redeye.o \
|
|
|
|
rpl.o serial.o settings.o stack.o symbfile.o timer.o udp.o \
|
2024-03-19 22:37:03 +01:00
|
|
|
$(RSRCOBJ)
|
|
|
|
|
2024-03-19 23:35:30 +01:00
|
|
|
LIBS=-lwinmm -lcomctl32 -lws2_32
|
2024-03-19 22:37:03 +01:00
|
|
|
|
|
|
|
all: $(TARGET)
|
|
|
|
|
|
|
|
rebuild: tidy $(TARGET)
|
|
|
|
|
|
|
|
tidy: cleanemacs cleanobj cleanexe
|
|
|
|
|
|
|
|
cleanemacs:
|
|
|
|
-rm -f *~
|
|
|
|
|
|
|
|
cleanobj:
|
|
|
|
-rm -f $(OBJS)
|
|
|
|
|
|
|
|
cleanexe:
|
|
|
|
-rm -f $(TARGET)
|
|
|
|
|
2024-03-19 22:38:33 +01:00
|
|
|
cursor.o: cursor.c pch.h emu48.h
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -c -o cursor.o cursor.c
|
|
|
|
|
2024-03-19 22:37:03 +01:00
|
|
|
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 \
|
2024-03-19 23:35:29 +01:00
|
|
|
types.h opcodes.h ops.h color.h disrpl.h debugger.h
|
2024-03-19 22:37:03 +01:00
|
|
|
$(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
|
|
|
|
|
2024-03-19 23:35:30 +01:00
|
|
|
dismem.o: dismem.c pch.h emu48.h
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -c -o dismem.o dismem.c
|
|
|
|
|
2024-03-19 22:37:03 +01:00
|
|
|
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
|
|
|
|
|
2024-03-19 23:35:29 +01:00
|
|
|
disrpl.o: disrpl.c pch.h Emu48.h disrpl.h
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -c -o disrpl.o disrpl.c
|
|
|
|
|
2024-03-19 23:35:29 +01:00
|
|
|
emu48.o: emu48.c pch.h resource.h emu48.h types.h \
|
2024-03-19 22:37:03 +01:00
|
|
|
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
|
|
|
|
|
2024-03-19 23:33:35 +01:00
|
|
|
keymacro.o: keymacro.c pch.h resource.h Emu48.h kml.h
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -c -o keymacro.o keymacro.c
|
|
|
|
|
2024-03-19 22:37:03 +01:00
|
|
|
kml.o: kml.c pch.h resource.h emu48.h types.h kml.h
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -c -o kml.o kml.c
|
|
|
|
|
2024-03-19 23:35:29 +01:00
|
|
|
lowbat.o: lowbat.c pch.h Emu48.h io.h
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -c -o lowbat.o lowbat.c
|
|
|
|
|
2024-03-19 22:37:03 +01:00
|
|
|
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
|
|
|
|
|
2024-03-19 23:35:29 +01:00
|
|
|
mru.o: mru.c pch.h resource.h emu48.h
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -c -o mru.o mru.c
|
|
|
|
|
2024-03-19 22:37:03 +01:00
|
|
|
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
|
|
|
|
|
2024-03-19 23:35:30 +01:00
|
|
|
redeye.o: redeye.c pch.h emu48.h io.h
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -c -o redeye.o redeye.c
|
|
|
|
|
2024-03-19 22:37:03 +01:00
|
|
|
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
|
|
|
|
|
2024-03-19 23:35:29 +01:00
|
|
|
stack.o: stack.c pch.h resource.h Emu48.h io.h
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -c -o stack.o stack.c
|
|
|
|
|
2024-03-19 23:35:29 +01:00
|
|
|
symbfile.o: symbfile.c pch.h emu48.h
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -c -o symbfile.o symbfile.c
|
|
|
|
|
2024-03-19 22:37:03 +01:00
|
|
|
timer.o: timer.c pch.h emu48.h types.h io.h
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -c -o timer.o timer.c
|
|
|
|
|
2024-03-19 23:35:30 +01:00
|
|
|
udp.o: udp.c pch.h io.h
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -c -o udp.o udp.c
|
|
|
|
|
2024-03-19 22:38:33 +01:00
|
|
|
$(RSRCOBJ): $(RSRC) resource.h emu48.ico dbgtool.bmp checkbox.bmp Emu48.xml
|
2024-03-19 22:37:03 +01:00
|
|
|
windres $(DEFINES) -i $(RSRC) -o $(RSRCOBJ)
|
|
|
|
|
|
|
|
$(TARGET): $(OBJS)
|
|
|
|
$(LD) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
|