Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: I installed the ISO of Kallistios and CGYWIN... now what?

                  
   
  1. #11

    Default

    what about when I compile my own program? .. I should have asked that too with my previous question.

  2. #12
    DCEmu Newbie
    Join Date
    Jul 2006
    Posts
    17
    Rep Power
    0

    Default

    you just make a makefile. Here is one I use:

    [makefile]
    TARGET = name.elf
    OBJS = charbmp.o gfx.o
    all: rm-elf $(TARGET)

    include $(KOS_BASE)/Makefile.rules

    #KOS_CFLAGS += -o3 -fstrict-aliasing -fomit-frame-pointer -ffunction-sections
    clean:
    -rm -f $(TARGET) $(OBJS) romdisk.*

    rm-elf:
    -rm -f $(TARGET) romdisk.*

    $(TARGET): $(OBJS) romdisk.o
    $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET) $(KOS_START) \
    $(OBJS) romdisk.o $(OBJEXTRA) -L$(KOS_BASE)/lib -lSDL_image -lSDL_mixer -lSDL -lpng -ljpeg -ltremor -lz -lm -lk++ $(KOS_LIBS)


    romdisk.img:
    $(KOS_GENROMFS) -f romdisk.img -d romdisk -v

    romdisk.o: romdisk.img
    $(KOS_BASE)/utils/bin2o/bin2o romdisk.img romdisk romdisk.o

    run: $(TARGET)
    $(KOS_LOADER) $(TARGET)


    TARGET = name.elf (Here you can name the .elf whatever you want).

    OBJS = charbmp.o gfx.o (Here is the object files that come from the compiler. Whatever '.c' , '.cpp' you use you add it here and replace the .c and .cpp with a .o .

    -L$(KOS_BASE)/lib -lSDL_image -lSDL_mixer -lSDL -lpng -ljpeg -ltremor -lz -lm -lk++ $(KOS_LIBS) (Here is where the libs go)

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •