Basic initializiation code
I print some messages to the screen and I have a makefile to compile libsaria and gui code.
This commit is contained in:
parent
b8e8f7179c
commit
c0ace6fed6
|
@ -1,3 +1,3 @@
|
|||
*.pyc
|
||||
*.o
|
||||
*.swp
|
||||
ocarina.py
|
||||
ocarina
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
export CC = g++
|
||||
export CFLAGS = -Wall -Werror -g -O2
|
||||
export INCLUDE = -I$(CURDIR)/include
|
||||
#export LINK = `sdl-config --cflags --libs` -lSDL_image -lSDL_mixer `pkg-config --cflags --libs lua` -ldl
|
||||
export BUILD = $(CC) $(CFLAGS) $(INCLUDE)
|
||||
export SRCDIR = $(CURDIR)
|
||||
|
||||
DIRS = libsaria gui
|
||||
CLEANDIRS = $(DIRS:%=clean-%)
|
||||
|
||||
.PHONY: all $(DIRS) clean $(CLEANDIRS)
|
||||
|
||||
all: $(DIRS)
|
||||
$(BUILD) $(shell find . | grep "\.o$$") -o ocarina $(LINK)
|
||||
|
||||
$(DIRS):
|
||||
$(MAKE) -f $(SRCDIR)/scripts/Makefile -C $@
|
||||
|
||||
clean: $(CLEANDIRS)
|
||||
rm -f *.o a.out
|
||||
|
||||
$(CLEANDIRS):
|
||||
$(MAKE) -f $(SRCDIR)/scripts/Makefile -C $(@:clean-%=%) clean
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
#include <libsaria/libsaria.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
print("Ocarina 5.0");
|
||||
libsaria_init();
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef LIBSARIA_H
|
||||
#define LIBSARIA_H
|
||||
|
||||
#include <libsaria/print.h>
|
||||
|
||||
void libsaria_init();
|
||||
|
||||
#endif /* LIBSARIA_H */
|
|
@ -0,0 +1,6 @@
|
|||
#ifndef LIBSARIA_PRINT
|
||||
#define LIBSARIA_PRINT
|
||||
|
||||
void print(string item);
|
||||
|
||||
#endif /* LIBSARIA_PRINT */
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
#include <libsaria/libsaria.h>
|
||||
|
||||
void libsaria_init()
|
||||
{
|
||||
print("Initializing libsaria");
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
#include <libsaria/print.h>
|
||||
|
||||
void print(string item)
|
||||
{
|
||||
cout << item << endl;
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
# Bryan Schumaker (4 / 1 / 2011)
|
||||
|
||||
DIRS = $(shell ls -l | grep '^d' | awk '{print $$9}')
|
||||
FILES = $(shell ls *.cpp)
|
||||
OBJS = $(FILES:%.cpp=%.o)
|
||||
CLEANDIRS = $(DIRS:%=clean-%)
|
||||
|
||||
.PHONY: all $(DIRS) clean $(CLEANDIRS)
|
||||
|
||||
all:$(OBJS) $(DIRS)
|
||||
|
||||
%.o: %.cpp
|
||||
$(BUILD) -c $*.cpp $(LINK)
|
||||
|
||||
$(DIRS):
|
||||
$(MAKE) -f $(SRCDIR)/scripts/Makefile -C $@
|
||||
|
||||
clean: $(CLEANDIRS)
|
||||
rm -f *.o
|
||||
|
||||
$(CLEANDIRS):
|
||||
$(MAKE) -f $(SRCDIR)/scripts/Makefile -C $(@:clean-%=%) clean
|
Loading…
Reference in New Issue