2016-12-26 16:03:06 +00:00
|
|
|
LINK.o = $(LINK.cc)
|
2017-08-09 00:16:58 +00:00
|
|
|
CXXFLAGS = -std=c++14 -g -Wall -Wno-sign-compare
|
2016-12-26 16:03:06 +00:00
|
|
|
CCFLAGS = -g
|
|
|
|
|
2017-01-08 03:19:28 +00:00
|
|
|
DUMP_OBJS = dumpobj.o disassembler.o zrdz_disassembler.o
|
2017-08-09 00:16:58 +00:00
|
|
|
LINK_OBJS = link.o expression.o omf.o set_file_type.o afp/libafp.a
|
2016-12-26 16:03:06 +00:00
|
|
|
|
2017-03-11 16:48:21 +00:00
|
|
|
# static link if using mingw32 or mingw64 to make redistribution easier.
|
|
|
|
# also add mingw directory.
|
|
|
|
ifeq ($(MSYSTEM),MINGW32)
|
|
|
|
DUMP_OBJS += mingw/err.o
|
|
|
|
LINK_OBJS += mingw/err.o
|
|
|
|
CPPFLAGS += -I mingw/
|
|
|
|
LDLIBS += -static
|
|
|
|
endif
|
|
|
|
|
2016-12-26 16:03:06 +00:00
|
|
|
ifeq ($(MSYSTEM),MINGW64)
|
2017-01-08 03:19:28 +00:00
|
|
|
DUMP_OBJS += mingw/err.o
|
|
|
|
LINK_OBJS += mingw/err.o
|
2016-12-26 16:14:38 +00:00
|
|
|
CPPFLAGS += -I mingw/
|
2017-01-06 16:27:49 +00:00
|
|
|
LDLIBS += -static
|
2016-12-26 16:03:06 +00:00
|
|
|
endif
|
|
|
|
|
2017-01-08 03:19:28 +00:00
|
|
|
.PHONY: all
|
|
|
|
all: wdcdumpobj wdclink
|
2016-12-26 16:03:06 +00:00
|
|
|
|
2017-01-08 03:19:28 +00:00
|
|
|
wdcdumpobj : $(DUMP_OBJS)
|
2017-01-05 20:41:07 +00:00
|
|
|
$(LINK.o) $^ $(LDLIBS) -o $@
|
2016-12-25 05:04:17 +00:00
|
|
|
|
2017-01-08 03:19:28 +00:00
|
|
|
wdclink : $(LINK_OBJS)
|
|
|
|
$(LINK.o) $^ $(LDLIBS) -o $@
|
|
|
|
|
|
|
|
|
2017-08-09 00:16:58 +00:00
|
|
|
subdirs :
|
|
|
|
$(MAKE) -C afp
|
|
|
|
|
2016-12-25 05:04:17 +00:00
|
|
|
disassembler.o : disassembler.cpp disassembler.h
|
2017-01-05 04:50:35 +00:00
|
|
|
zrdz_disassembler.o : zrdz_disassembler.cpp zrdz_disassembler.h disassembler.h
|
|
|
|
dumpobj.o : dumpobj.cpp zrdz_disassembler.h disassembler.h
|
2017-01-10 13:36:06 +00:00
|
|
|
omf.o : omf.cpp omf.h
|
|
|
|
expression.o : expression.cpp expression.h
|
2016-12-26 16:14:38 +00:00
|
|
|
mingw/err.o : mingw/err.c mingw/err.h
|
2016-12-24 22:09:12 +00:00
|
|
|
|
2017-08-09 00:16:58 +00:00
|
|
|
set_file_type.o : CPPFLAGS += -I afp/include
|
|
|
|
set_file_type.o : set_file_type.cpp
|
|
|
|
|
|
|
|
afp/libafp.a : subdirs
|
|
|
|
|
2016-12-26 16:03:06 +00:00
|
|
|
.PHONY: clean
|
2016-12-24 22:09:12 +00:00
|
|
|
clean:
|
2017-01-16 21:15:05 +00:00
|
|
|
$(RM) wdcdumpobj wdclink $(DUMP_OBJS) $(LINK_OBJS)
|
2017-08-09 00:16:58 +00:00
|
|
|
$(MAKE) -C afp clean
|
2016-12-26 16:14:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
.PHONY: variables
|
|
|
|
variables :
|
|
|
|
$(foreach v, $(.VARIABLES), $(info $(v) = $($(v))))
|
|
|
|
@echo
|