wdc-utils/Makefile

41 lines
879 B
Makefile
Raw Normal View History

2016-12-26 16:03:06 +00:00
LINK.o = $(LINK.cc)
2017-01-09 01:17:10 +00:00
CXXFLAGS = -std=c++14 -g -Wall
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
LINK_OBJS = link.o expression.o
2016-12-26 16:03:06 +00:00
2016-12-26 16:14:38 +00:00
#UNAME_S := $(shell uname -s)
2016-12-26 16:03:06 +00:00
#ifeq ($(UNAME_S),MINGW64_NT-10.0)
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/
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 $@
2016-12-25 05:04:17 +00:00
disassembler.o : disassembler.cpp disassembler.h
zrdz_disassembler.o : zrdz_disassembler.cpp zrdz_disassembler.h disassembler.h
dumpobj.o : dumpobj.cpp zrdz_disassembler.h disassembler.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
2016-12-26 16:03:06 +00:00
.PHONY: clean
2016-12-24 22:09:12 +00:00
clean:
2017-01-08 03:19:28 +00:00
$(RM) wdcdumpobj $(DUMP_OBJS) $(LINK_OBJS)
2016-12-26 16:14:38 +00:00
.PHONY: variables
variables :
$(foreach v, $(.VARIABLES), $(info $(v) = $($(v))))
@echo