-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
96 lines (76 loc) · 2.93 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
CFLAGS = -c -fno-asynchronous-unwind-tables -fno-strict-aliasing -fpermissive -std=gnu++14 -Wall -Wextra -Wwrite-strings
IFLAGS = -I. -D__USE_INLINE__
ifdef PREFIX
AR = @$(PREFIX)ar
CC = @$(PREFIX)g++
LD = @$(PREFIX)g++
else
AR = @ar
CC = @g++
LD = @g++
endif
ifdef DEBUG
OBJ = Debug
CFLAGS += -ggdb -D_DEBUG -DMUNGWALL_NO_LINE_TRACKING
else
OBJ = Release
CFLAGS += -O2
endif
ifdef PREFIX
ifeq ($(PREFIX), ppc-amigaos-)
CFLAGS += -athread=native
LFLAGS += -athread=native
OBJ := $(OBJ)_OS4
else
CFLAGS += -mcrt=clib2
AUTO_LIBRARY = $(OBJ)/libauto.a
endif
endif
LIBRARY = $(OBJ)/libStdFuncs.a
ifdef PREFIX
OBJECTS = $(OBJ)/AmiMenus.o $(OBJ)/Args.o $(OBJ)/Dir.o $(OBJ)/File.o $(OBJ)/FileUtils.o $(OBJ)/Lex.o $(OBJ)/MungWall.o \
$(OBJ)/RemoteDir.o $(OBJ)/RemoteFactory.o $(OBJ)/RemoteFile.o $(OBJ)/RemoteFileUtils.o \
$(OBJ)/StdApplication.o $(OBJ)/StdCharConverter.o $(OBJ)/StdClipboard.o $(OBJ)/StdConfigFile.o $(OBJ)/StdCRC.o $(OBJ)/StdDialog.o \
$(OBJ)/StdFileRequester.o $(OBJ)/StdFont.o $(OBJ)/StdGadgets.o $(OBJ)/StdGadgetLayout.o $(OBJ)/StdGadgetSlider.o \
$(OBJ)/StdGadgetStatusBar.o $(OBJ)/StdGadgetTree.o $(OBJ)/StdImage.o $(OBJ)/StdPool.o $(OBJ)/StdRendezvous.o $(OBJ)/StdSocket.o \
$(OBJ)/StdStringList.o $(OBJ)/StdTextFile.o $(OBJ)/StdTime.o $(OBJ)/StdWildcard.o $(OBJ)/StdWindow.o $(OBJ)/Test.o \
$(OBJ)/Utils.o
ifneq ($(PREFIX), ppc-amigaos-)
AUTO_OBJECTS = $(OBJ)/AutoAsl.o $(OBJ)/AutoBitMap.o $(OBJ)/AutoCheckBox.o $(OBJ)/AutoDataTypes.o $(OBJ)/AutoDiskfont.o \
$(OBJ)/AutoGadTools.o $(OBJ)/AutoGfx.o $(OBJ)/AutoIcon.o $(OBJ)/AutoIFFParse.o $(OBJ)/AutoIntuition.o $(OBJ)/AutoKeymap.o \
$(OBJ)/AutoLabel.o $(OBJ)/AutoLayout.o $(OBJ)/AutoListBrowser.o $(OBJ)/AutoScroller.o $(OBJ)/AutoString.o \
$(OBJ)/AutoUtility.o $(OBJ)/AutoWindow.o $(OBJ)/SafeOpenLibrary.o
OBJECTS += $(OBJ)/OS4Support.o
endif
else
OBJECTS = $(OBJ)/Args.o $(OBJ)/StdCharConverter.o $(OBJ)/Dir.o $(OBJ)/File.o $(OBJ)/FileUtils.o $(OBJ)/Lex.o $(OBJ)/MungWall.o \
$(OBJ)/RemoteDir.o $(OBJ)/RemoteFactory.o $(OBJ)/RemoteFile.o $(OBJ)/RemoteFileUtils.o \
$(OBJ)/StdConfigFile.o $(OBJ)/StdCRC.o $(OBJ)/StdPool.o $(OBJ)/StdRendezvous.o $(OBJ)/StdSocket.o $(OBJ)/StdStringList.o \
$(OBJ)/StdTextFile.o $(OBJ)/StdTime.o $(OBJ)/StdWildcard.o $(OBJ)/Test.o $(OBJ)/Utils.o
endif
OBJECTS += $(OBJ)/Handler.o
all: $(OBJ) $(LIBRARY) $(AUTO_LIBRARY)
$(OBJ):
@mkdir $(OBJ)
$(LIBRARY): $(OBJECTS)
@echo Creating library $@...
$(AR) -rs $@ $(OBJECTS)
ifdef PREFIX
$(AUTO_LIBRARY): $(AUTO_OBJECTS)
@echo Creating library $@...
$(AR) -rs $@ $(AUTO_OBJECTS)
endif
$(OBJ)/%.o: %.cpp
@echo Compiling $<...
$(CC) $(CFLAGS) $(IFLAGS) -o $(OBJ)/$*.o $<
$(OBJ)/%.o: Amiga/%.cpp
@echo Compiling $<...
$(CC) $(CFLAGS) $(IFLAGS) -o $(OBJ)/$*.o $<
$(OBJ)/%.o: Auto/%.c
@echo Compiling $<...
$(CC) $(CFLAGS) $(IFLAGS) -o $(OBJ)/$*.o $<
$(OBJ)/%.o: Yggdrasil/%.cpp
@echo Compiling $<...
$(CC) $(CFLAGS) $(IFLAGS) -o $(OBJ)/$*.o $<
clean:
@rm -fr $(OBJ)