File: Makefile.vbcc

package info (click to toggle)
wildmidi 0.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,332 kB
  • sloc: ansic: 14,455; sh: 351; makefile: 284
file content (61 lines) | stat: -rw-r--r-- 1,330 bytes parent folder | download
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
# GNU Makefile to build for AmigaOS variants using VBCC
#
# make amigaos  : build for m68k-amigaos

# for now, only tested for m68k-amigaos:
AOS3 := 1

# The tools
CC=vc
#MKLIB=join $(LIB_OBJ) as WildMidi.lib
MKLIB=cat $(LIB_OBJ) > WildMidi.lib

INCLUDE = -I. -I../include
CFLAGS  = -O1 -speed -c99
CFLAGS += $(INCLUDE)
LDFLAGS = -L. -lWildMidi

ifeq ($(MORPHOS),1)
include vbcc_morphos.cfg
endif
ifeq ($(AOS3),1)
include vbcc_aos3.cfg
endif
ifeq ($(AOS4),1)
include vbcc_aos4.cfg
endif

# Build rules
%.o: %.c
	$(CC) -c $(CFLAGS) -o $@ $<
%.o: ../src/%.c
	$(CC) -c $(CFLAGS) -o $@ $<

# Objects
LIB_OBJ= wm_error.o file_io.o lock.o wildmidi_lib.o reverb.o gus_pat.o f_xmidi.o f_mus.o f_hmp.o f_midi.o f_hmi.o mus2mid.o xmi2mid.o internal_midi.o patches.o sample.o
PLAYER_OBJ= getopt_long.o wm_tty.o amiga.o wildmidi.o

# Build targets
.PHONY: clean distclean
all: WildMidi.lib wildmidi

WildMidi.lib: $(LIB_OBJ)
	$(MKLIB)

wildmidi: WildMidi.lib $(PLAYER_OBJ)
	$(CC) -o $@ $(PLAYER_OBJ) $(LDFLAGS)

amigaos:
	@echo Building for m68k-amigaos
	$(MAKE) -f Makefile.vbcc AOS3=1
amigaos4:
	@echo Building for ppc-amigaos4
	$(MAKE) -f Makefile.vbcc AOS4=1
morphos:
	@echo Building for ppc-morphos
	$(MAKE) -f Makefile.vbcc MORPHOS=1

clean:
	rm -rf $(LIB_OBJ) $(PLAYER_OBJ)
distclean: clean
	rm -rf libWildMidi.a WildMidi.lib wildmidi