File: Makefile

package info (click to toggle)
komposter 0%2Bgit20201216%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,716 kB
  • sloc: ansic: 15,586; sh: 4,176; asm: 642; makefile: 72
file content (38 lines) | stat: -rw-r--r-- 863 bytes parent folder | download | duplicates (2)
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

UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
GCC_PARAMS=-DMACOSX -Os -m32 -fomit-frame-pointer -ffast-math -Wall -fpack-struct -I/opt/local/include
NASM_PARAMS=-f elf32 -w+orphan-labels
AL_LD_PARAMS=-e _start -lc -shared --oformat elf32-i386
endif
ifeq ($(UNAME), Darwin)
GCC_PARAMS=-m32 -DMACOSX -Os -fomit-frame-pointer -ffast-math -Wall -fpack-struct -I/opt/local/include
NASM_PARAMS=-f macho -DMACOSX -w+orphan-labels
AL_LD_PARAMS=-m32 -e _start -framework OpenAL -lc
endif

OBJS=main.o player.o
#DEBUG=-DDEBUG=1 -g
DEBUG=-O2

.c.o:
	gcc $(GCC_PARAMS) $(DEBUG) $(FEATURES) -c $<

%.o: %.asm
	nasm $(NASM_PARAMS) $(DEBUG) $(FEATURES) $<

player: $(OBJS)
	gcc $(AL_LD_PARAMS) -o player main.o player.o
	strip player

pcompr:
	../../laturi/laturi.32 -f OpenAL -v -o pcompr -i main.o -i player.o

all: player

clean:
	rm -f example *.o *~ audio.raw player