How to program an stand-alone atmega328?

I have burned a bootloader on a atmega328 with the help of this topic. I have also a MEGA 2560. How can a program the atmega328 on an breadboard? Can I also program the AVR without a bootloader?

If I select my MEGA as an 'Arduino as ISP' and I select the board 'ATmega328 on a breadboard', I get the error message : avrdude: stk500_getsync(): not in sync: resp=0x00

This is inserted on my boards.txt:

##############################################################

atmega328bb.name=ATmega328 on a breadboard (8 MHz interne clock)

atmega328bb.upload.protocol=stk500
atmega328bb.upload.maximum_size=30720
atmega328bb.upload.speed=57600

atmega328bb.bootloader.low_fuses=0xE2
atmega328bb.bootloader.high_fuses=0xDA
atmega328bb.bootloader.extended_fuses=0x05
atmega328bb.bootloader.path=arduino:atmega
atmega328bb.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex
atmega328bb.bootloader.unlock_bits=0x3F
atmega328bb.bootloader.lock_bits=0x0F

atmega328bb.build.mcu=atmega328p
atmega328bb.build.f_cpu=8000000L
atmega328bb.build.core=arduino:arduino
atmega328bb.build.variant=arduino:standard

A search with Google for the answer to your question

"How to program an stand-alone atmega328?"

brought this answer... My don't you feel 'silly'... You typed the question where the answer goes..
If you'd just put the question in the right place, You might be capable of telling us.
On a more or less serious note Googling for the answer is much faster than asking here and either someone else did what I did which was copy your question into a search box.. Or waiting for the person with the same knowledge to read your question and answer it.
This is the primary reason for using Google to begin with, You can find all the answers in one place.
It works for Me.

Bob

In my start-topic you can read that I have an Arduino MEGA. So that means I cannot remove the microcontroller from the arduino board.