view makefile @ 3:17286938e22a

change DS alt. rotate key to rotate twice
author paulo@localhost
date Wed, 08 Apr 2009 21:50:13 -0700
parents c84446dfb3f5
children
line source
1 # Makefile for Allegro version of LOCKJAW
2 # under Windows and Linux
3 #
4 # Copr. 2006-2007 Damian Yerrick
5 #
6 # This work is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 EXE := lj.exe
22 CFLAGS := -Wall -O2 -std=gnu99 -DWITH_REPLAY=1 -DHAS_FPU
23 CC := gcc
24 LD := gcc
25 LDFLAGS := -Wall -s -mwindows
26 srcdir := src
27 objdir := obj/win32
29 # Set this to the drive letter of your CF or SD card adapter
30 # so that 'make cf' works
31 # for info about Ejector by Jim Price, see the GBA makefile
32 CFDRIVE := h
34 MUSICOBJS := $(objdir)/ljvorbis.o
35 #MUSICLIBS := -laldmb -ldumb -lvorbisfile -lvorbis -logg
36 MUSICLIBS := -lvorbisfile -lvorbis -logg
38 LDLIBS := -lshfolder -ljpgal -lalleg
39 LINUXLDLIBS := -ljpgal `allegro-config --libs`
40 DEPOBJS := $(objdir)/ljpc.o $(objdir)/lj.o $(objdir)/ljplay.o \
41 $(objdir)/pcjoy.o $(objdir)/gimmicks.o $(objdir)/random.o \
42 $(objdir)/wktables.o $(objdir)/speed.o $(objdir)/options.o \
43 $(objdir)/debrief.o $(objdir)/macro.o $(objdir)/ljreplay.o \
44 $(objdir)/ljmusic.o $(objdir)/old_pc_options.o $(objdir)/pcsound.o \
45 $(objdir)/pcdebrief.o $(objdir)/ljlocale.o $(objdir)/scenario.o \
46 $(objdir)/ljpath.o \
47 $(MUSICOBJS)
49 OTHEROBJS := $(objdir)/winicon.o
51 .PHONY: pc clean lj.gba lj.nds cf all run
53 # Scripts to coordinate building the PC, GBA, and DS versions
55 pc: $(EXE)
57 run: $(EXE)
58 ./lj
60 all: $(EXE) lj.gba lj.nds
62 cf: /$(CFDRIVE)/gba/lj.gba /$(CFDRIVE)/lj.nds
63 #ejector from http://www.jimprice.com/jim-soft.shtml#eject
64 ejector $(CFDRIVE):
66 /$(CFDRIVE)/gba/lj.gba: lj.gba
67 cp $< $@
69 /$(CFDRIVE)/lj.nds: lj.nds
70 cp $< $@
72 lj.gba:
73 +make -f gbamakefile $@
75 lj.nds:
76 +make -f dsmakefile $@
78 # Content of executable
80 $(EXE): $(DEPOBJS) $(OTHEROBJS)
81 $(LD) $(LDFLAGS) $^ $(MUSICLIBS) $(LDLIBS) -o $@
83 # kesiev's makefile for GNU/Linux
85 linux: $(DEPOBJS)
86 $(LD) $(LDFLAGS) $^ $(MUSICLIBS) $(LINUXLDLIBS) -o lj
88 # Compilation rules
90 $(objdir)/%.o: $(srcdir)/%.c
91 $(CC) $(CFLAGS) -MMD -c -o $@ $<
92 @cp $(objdir)/$*.d $(objdir)/$*.P; \
93 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
94 -e '/^$$/ d' -e 's/$$/ :/' < $(objdir)/$*.d >> $(objdir)/$*.P; \
95 rm -f $(objdir)/$*.d
97 $(objdir)/%.o: src/%.rc docs/favicon.ico
98 windres -i $< -o $@
100 # Header dependencies
102 -include $(DEPOBJS:%.o=%.P)
105 # Cleanup rules
107 clean:
108 -rm $(objdir)/*.o
109 -rm $(objdir)/*.P