Subversion Repositories Tewi

Rev

Rev 244 | Rev 253 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 nishi 1
# $Id: Makefile 249 2024-10-03 20:59:55Z nishi $
2
 
212 nishi 3
OBJ=o
4
STATIC=a
2 nishi 5
include $(PWD)/Platform/$(PLATFORM).mk
6
 
7
.PHONY: all clean
212 nishi 8
.SUFFIXES: .c .$(OBJ)
2 nishi 9
 
212 nishi 10
OBJS = main.$(OBJ) version.$(OBJ) config.$(OBJ) server.$(OBJ) http.$(OBJ) module.$(OBJ) strptime.$(OBJ) font.$(OBJ) $(EXTOBJS) $(PREOBJS)
2 nishi 11
 
182 nishi 12
all: tewi$(EXEC) $(TARGET)
2 nishi 13
 
182 nishi 14
tewi_strip$(EXEC): tewi$(EXEC)
15
 
215 nishi 16
tewi$(EXEC): $(OBJS) ../Common/common.$(STATIC) $(REQOBJS)
212 nishi 17
	$(CC) $(LDFLAGS) $(EXTLDFLAGS) -o $@ $(OBJS) $(EXTLIBS) ../Common/common.$(STATIC) $(LIBS)
182 nishi 18
	$(SERVADD)
2 nishi 19
 
182 nishi 20
tewi.pbp: tewi_strip$(EXEC) param.sfo
183 nishi 21
	pack-pbp $@ param.sfo ../Binary/psp.png NULL NULL NULL NULL tewi_strip$(EXEC) NULL
182 nishi 22
 
23
param.sfo:
24
	mksfoex -d MEMSIZE=1 'Tewi HTTPd' $@
25
 
187 nishi 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
197 nishi 32
	mkdir -p pkg/USRDIR/etc
33
	mkdir -p pkg/USRDIR/www
193 nishi 34
	cp ../Binary/ps3.png pkg/ICON0.PNG
197 nishi 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
193 nishi 39
	make_self_npdrm tewi_strip$(EXEC) pkg/USRDIR/EBOOT.BIN UP0001-TEWI_00-0000000000000000
187 nishi 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
195 nishi 43
	package_finalize $@
187 nishi 44
 
212 nishi 45
.c.$(OBJ):
44 nishi 46
	$(CC) $(CFLAGS) $(EXTCFLAGS) -c -o $@ $<
2 nishi 47
 
128 nishi 48
tewi.res: tewi.rc ../Binary/tewi.ico
48 nishi 49
	$(WINDRES) tewi.rc -O coff -o $@
50
 
215 nishi 51
tewi_bcc.res: tewi.rc ../Binary/tewi.ico
52
	brc32 -r -fo$@ tewi.rc
53
 
244 nishi 54
gui.res: gui.rc gui.h
55
	$(WINDRES) gui.rc -O coff -o $@
56
 
57
gui_bcc.res: gui.rc gui.h
58
	brc32 -r -fo$@ gui.rc
59
 
249 nishi 60
vc6.res: tewi.rc gui.rc
61
	cat tewi.rc gui.rc > concat.rc
62
	rc /fo$@ concat.rc
63
	rm -f concat.rc
64
 
2 nishi 65
clean:
249 nishi 66
	rm -f *.o tewi *.exe *.res *.elf *.sfo *.pbp *.self *.pkg *.obj concat.rc