File: Makefile.osx

package info (click to toggle)
orbital-eunuchs-sniper 1.30+svn20070601-4
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 5,216 kB
  • ctags: 783
  • sloc: cpp: 5,938; sh: 3,659; ansic: 1,352; makefile: 98
file content (68 lines) | stat: -rw-r--r-- 1,363 bytes parent folder | download | duplicates (4)
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
CC := gcc
CXX := g++
LINKER := g++
ASM := nasm
SRCDIR := ./src
BINDIR := ./objs
EXE := ./bin/oes

CFLAGS := -g $(shell sdl-config --cflags) -D OSX_SUX
CXXFLAGS := $(CFLAGS)
LDFLAGS := $(shell sdl-config --libs) -lSDL_image -lSDL_mixer \
           $(shell libpng-config --ldflags) -framework QuickTime

SRCS := snipe2d.cpp \
        ai.cpp \
        zooms.cpp \
        render_ai.cpp \
        logoscreen.cpp \
        petopt.cpp \
        target.cpp \
        gameover.cpp \
        prints.cpp \
        pmanage.cpp \
        highscores.cpp

OBJS1 := $(SRCS:.c=.o)
OBJS2 := $(OBJS1:.cpp=.o)
OBJS3 := $(OBJS2:.asm=.o)
OBJS := $(foreach f,$(OBJS3),$(BINDIR)/$(f))
SRCS := $(foreach f,$(SRCS),$(SRCDIR)/$(f))

CLEANUP = $(wildcard *.exe) $(wildcard *.obj) \
          $(wildcard $(BINDIR)/*.exe) $(wildcard $(BINDIR)/*.obj) \
          $(wildcard *~) $(wildcard *.err) \
          $(wildcard .\#*) core $(EXE)


# Rules for compiling individual source files...

$(BINDIR)/%.o: $(SRCDIR)/%.cpp
	$(CC) -c -o $@ $< $(CXXFLAGS)

$(BINDIR)/%.o: $(SRCDIR)/%.c
	$(CC) -c -o $@ $< $(CFLAGS)

$(BINDIR)/%.o: $(SRCDIR)/%.asm
	$(ASM) $(ASMFLAGS) -o $@ $<

all: bindir oes

oes: bindir $(OBJS)
	$(LINKER) -o $(EXE) $(OBJS) $(LDFLAGS)

$(BINDIR) :
	$(MAKE) bindir

bindir :
	mkdir -p $(BINDIR)

distclean: clean

clean:
	rm -f $(CLEANUP)
	rm -rf $(BINDIR)

# end of Makefile.