1 |
# $Id: Makefile 315 2024-10-14 10:01:02Z nishi $ |
2 |
|
3 |
OBJ=o |
4 |
STATIC=a |
5 |
include $(PWD)/Platform/$(PLATFORM).mk |
6 |
|
7 |
.PHONY: all clean |
8 |
.SUFFIXES: .c .$(OBJ) |
9 |
|
10 |
OBJS = main.$(OBJ) version.$(OBJ) config.$(OBJ) server.$(OBJ) http.$(OBJ) module.$(OBJ) strptime.$(OBJ) font.$(OBJ) $(EXTOBJS) $(PREOBJS) |
11 |
|
12 |
all: tewi$(EXEC) $(TARGET) |
13 |
|
14 |
tewi_strip$(EXEC): tewi$(EXEC) |
15 |
|
16 |
tewi$(EXEC): $(OBJS) ../Common/common.$(STATIC) $(REQOBJS) |
17 |
$(CC) $(LDFLAGS) $(EXTLDFLAGS) -o $@ $(OBJS) $(EXTLIBS) ../Common/common.$(STATIC) $(LIBS) |
18 |
$(SERVADD) |
19 |
|
20 |
tewi.pbp: tewi_strip$(EXEC) param.sfo |
21 |
pack-pbp $@ param.sfo ../Binary/psp.png NULL NULL NULL NULL tewi_strip$(EXEC) NULL |
22 |
|
23 |
param.sfo: |
24 |
mksfoex -d MEMSIZE=1 'Tewi HTTPd' $@ |
25 |
|
26 |
tewi.self: tewi_strip$(EXEC) |
27 |
sprxlinker tewi_strip$(EXEC) |
28 |
make_self_npdrm tewi_strip$(EXEC) $@ UP0001-TEWI_00-0000000000000000 |
29 |
fself tewi_strip$(EXEC) tewi.fake.self |
30 |
|
31 |
tewi.pkg: tewi.self |
32 |
mkdir -p pkg/USRDIR/etc |
33 |
mkdir -p pkg/USRDIR/www |
34 |
cp ../Binary/ps3.png pkg/ICON0.PNG |
35 |
../Tool/genconf /dev_hdd0/game/TEWI_00-0/USRDIR lib/tewi so > pkg/USRDIR/etc/tewi.conf |
36 |
cp ../Binary/pbtewi.gif pkg/USRDIR/www/ |
37 |
convert '../Binary/pbtewi.gif[0]' pkg/USRDIR/pbtewi.png |
38 |
../Tool/itworks > pkg/USRDIR/www/index.html |
39 |
make_self_npdrm tewi_strip$(EXEC) pkg/USRDIR/EBOOT.BIN UP0001-TEWI_00-0000000000000000 |
40 |
sfo.py --title "Tewi HTTPd" --appid "TEWI" -f /usr/local/ps3dev/bin/sfo.xml pkg/PARAM.SFO |
41 |
pkg.py --contentid UP0001-TEWI_00-0000000000000000 pkg/ $@ |
42 |
rm -rf pkg |
43 |
package_finalize $@ |
44 |
|
45 |
.c.$(OBJ): |
46 |
$(CC) $(CFLAGS) $(EXTCFLAGS) -c -o $@ $< |
47 |
|
48 |
gui.res: concat.rc ../Binary/tewi.ico |
49 |
$(WINDRES) concat.rc -O coff -o $@ |
50 |
|
51 |
gui_bcc.res: concat.rc gui.h |
52 |
brc32 -r -fo$@ concat.rc |
53 |
|
54 |
vc6.res: concat.rc |
55 |
rc /fo$@ concat.rc |
56 |
rm -f concat.rc |
57 |
|
58 |
concat.rc: tewi.rc gui.rc |
59 |
cat tewi.rc gui.rc > concat.rc |
60 |
|
61 |
clean: |
62 |
rm -f *.o tewi *.exe *.res *.elf *.sfo *.pbp *.self *.pkg *.obj concat.rc *.tds *.nlm |