freebsd-ports/emulators/cygne-sdl/files/Makefile.bsd
Cheng-Lung Sung 6b905a398b Add cygne-sdl 0.1, the SDL port of Cygne, a free Bandai Wonderswan
emulator.

PR:		ports/96805
Submitted by:	Li-Lun Wang <llwang@infor.org>
2006-05-27 15:55:40 +00:00

43 lines
1,022 B
Text

LD = ${CXX}
### Include and lib stuff ####
#STDINCLUDE = /usr/include
#STDLIB = /usr/lib
#SDLINCLUDE = /usr/local/include/SDL
#SDLLIB = /usr/local/lib
CFLAGS+= -DUNIX -DTARGET_UNIX -DGCC -DUSES_16BIT_ONLY -D__SDL__ -fomit-frame-pointer \
-fexpensive-optimizations -funroll-loops -funroll-all-loops -pipe \
-fschedule-insns2 -fstrength-reduce -malign-double -mfancy-math-387 -ffast-math -fforce-addr \
-fforce-mem `${SDL_CONFIG} --cflags`# \
# -L$(STDLIB) -L$(SDLLIB) -I$(STDINCLUDE) -I$(SDLINCLUDE)
#LDFLAGS = $(CFLAGS)
TARGET = cygne
OBJ = ddrawsdl.o filessdl.o gfx.o nec.o tcache.o memory.o mainsdl.o zlib/unzip.o
LIBS = `${SDL_CONFIG} --libs` -lz
all: $(TARGET)
INCS = -I. `${SDL_CONFIG} --cflags`
THECC = $(CC) $(CFLAGS) $(INCS)
THECXX = $(CXX) $(CFLAGS) $(INCS)
%.o: %.asm
$(NASM) -f elf -o $@ $<
%.o: %.c
$(THECC) -c $< -o $@
%.o: %.cpp
$(THECXX) -c $< -o $@
cygne: $(OBJ) Makefile
$(LD) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
clean:
rm -f cygne *.o zlib/*.o