Make it possible to use different toolkits by adding #ifdefs.

This commit is contained in:
Jonathan Schleifer 2012-01-05 02:17:35 +01:00
parent c73bc725ea
commit ec2f8fc03a
3 changed files with 7 additions and 5 deletions

View file

@ -1,12 +1,12 @@
PREFIX ?= /usr/local
all:
@objfw-compile -Wall -g --lib 0.0 -o objgui -I../headers \
@objfw-compile -DOG_GTK -Wall -g --lib 0.0 -o objgui -I../headers \
`pkg-config --cflags --libs gtk+-3.0` \
`ls *.m | fgrep -v test.m`
test:
@objfw-compile -Wall -g -o test -I../headers \
@objfw-compile -DOG_GTK -Wall -g -o test -I../headers \
`pkg-config --cflags --libs gtk+-3.0` \
*.m

View file

@ -1,5 +1,3 @@
#include <gtk/gtk.h>
#import <ObjFW/ObjFW.h>
@protocol OGApplicationDelegate <OFObject>

View file

@ -20,14 +20,18 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef OG_GTK
# include <gtk/gtk.h>
#endif
#import <ObjFW/ObjFW.h>
@interface OGWidget: OFObject
{
@public
#ifdef OG_GTK
GtkWidget *widget;
#endif
}
- (void)show;