Build unigi yeah
This commit is contained in:
parent
e1847d5d67
commit
b2963910d9
22
Makefile
22
Makefile
@ -21,24 +21,24 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
HALOOLIB = haloo3d/build/haloo3d_full.a
|
HALOOLIB = haloo3d/build/haloo3d_full.a
|
||||||
UNIGILIBDIR = unigi.platform.sdl1
|
UNIGIPLAT = $(BUILDD)/unigi.platform.sdl1.o
|
||||||
UNIGILIB = unigi.platform.sdl1.o
|
UNIGILIB = $(BUILDD)/unigi.a
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
.PHONY: full
|
.PHONY: libs
|
||||||
.PHONY: unigi
|
|
||||||
|
|
||||||
full:
|
libs: $(UNIGILIB) $(HALOOLIB)
|
||||||
@echo "Please specify a sample to build (ends with .exe)"
|
@echo "Built libs!"
|
||||||
|
|
||||||
$(HALOOLIB):
|
$(HALOOLIB):
|
||||||
cd haloo3d && $(MAKE) full
|
cd haloo3d && $(MAKE) full
|
||||||
|
|
||||||
$(UNIGILIB): $(UNIGILIBDIR)/main.c
|
$(UNIGIPLAT): unigi.platform.sdl1/main.c
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
mkdir -p $(BUILDD)
|
||||||
|
$(CC) $(CFLAGS) -I. -c $< -o $@
|
||||||
|
|
||||||
unigi: $(UNIGILIB)
|
$(UNIGILIB): $(UNIGIPLAT)
|
||||||
@echo "Built unigi!"
|
ar -vr $@ $^
|
||||||
|
|
||||||
# Rule to build .o files in main folder
|
# Rule to build .o files in main folder
|
||||||
$(BUILDD)/%.o: %.c %.h
|
$(BUILDD)/%.o: %.c %.h
|
||||||
@ -46,7 +46,7 @@ $(BUILDD)/%.o: %.c %.h
|
|||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
# Rule to build any sample. We ALWAYS need math so... link it
|
# Rule to build any sample. We ALWAYS need math so... link it
|
||||||
%.exe: %.o $(HALOOLIB) $(UNIGILIB)
|
%.exe: %.o $(UNIGILIB) $(HALOOLIB)
|
||||||
$(CC) $(CFLAGS) $^ -o $@ -lm -lSDL
|
$(CC) $(CFLAGS) $^ -o $@ -lm -lSDL
|
||||||
|
|
||||||
# Rule to clean the build files
|
# Rule to clean the build files
|
||||||
|
Loading…
Reference in New Issue
Block a user