-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
40 lines (30 loc) · 1.11 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
CC ?= gcc
RM ?= rm -rf
STRIP ?= strip
ifeq ($(OS),Windows_NT)
EXE_EXTENSION := .exe
endif
CFLAGS += -Wall -O2 -std=c99 -Iinclude
DEP_CORE= $(wildcard include/*.h)
SRC_CORE= pdkformat/pdkformat.c ihex/fpdkihex8.c
SRC_CORE+= emucpu/emucpu.c
SRC_CORE+= opcode/opcode13.c opcode/opcode14.c opcode/opcode15.c opcode/opcode16.c
SRC_CORE+= disass/disass13.c disass/disass14.c disass/disass15.c disass/disass16.c
SRC_CORE+= cpuvariant/generic.c cpuvariant/pmx150.c cpuvariant/pmx154.c cpuvariant/pmx173.c
OBJ_CORE= $(subst .c,.o,$(SRC_CORE))
all: depdk dispdk emupdk
depdk: $(DEP_CORE) $(OBJ_CORE) depdk.c
$(CC) $(CFLAGS) $(LDFLAGS) -o depdk depdk.c pdkformat/pdkformat.o $(LIBS)
$(STRIP) depdk$(EXE_EXTENSION)
dispdk: $(DEP_CORE) $(OBJ_CORE) dispdk.c
$(CC) $(CFLAGS) $(LDFLAGS) -o dispdk dispdk.c $(OBJ_CORE) $(LIBS)
$(STRIP) dispdk$(EXE_EXTENSION)
emupdk: $(DEP_CORE) $(OBJ_CORE) emupdk.c
$(CC) $(CFLAGS) $(LDFLAGS) -o emupdk emupdk.c $(OBJ_CORE) $(LIBS)
$(STRIP) emupdk$(EXE_EXTENSION)
clean:
$(RM) $(OBJ_CORE)
$(RM) depdk$(EXE_EXTENSION)
$(RM) dispdk$(EXE_EXTENSION)
$(RM) emupdk$(EXE_EXTENSION)
dist-clean: clean