# Makefile for Freedows Bootloader Demonstration Kernel # Programs to delete and copy files with REMOVE = rm -f # The C and C++ compilers (should be i386-GCC) GCC = gcc G++ = gcc #CFLAGS CFLAGS = -I./include -g # The linker LD = ld # The object files OBJS = main.o config.o socket.o modules.o parse.o user.o channel.o #Output Binary BINARY = ircd # Link the kernel statically with fixed text+data address @1M $(BINARY) : $(OBJS) $(GCC) -o $@ $(OBJS) # $(LD) -o $@ $(OBJS) -Ttext 0x100000 # Compile the source files .cc.o: $(G++) -Wall -fomit-frame-pointer -O $(CFLAGS) -c -o $@ $< .cc.s: $(G++) -Wall -fomit-frame-pointer -O $(CFLAGS) -S -o $@ $< .c.o: $(GCC) -Wall -fomit-frame-pointer -O $(CFLAGS) -c -o $@ $< .c.s: $(GCC) -Wall -fomit-frame-pointer -O $(CFLAGS) -S -o $@ $< .S.o: $(GCC) -Wall -fomit-frame-pointer -c -o $@ $< # Clean up the junk clean: $(REMOVE) $(OBJS) $(BINARY)